openstack报错CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead的解决办法
完整报错信息如下
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
报错原因:
弃用警告是由库如何从字节加载整数值引起的。这与 fastapi 无关,但是您正在使用的库中的问题。但是,该问题已在(2021-04-29) 。
解决办法:
尝试将加密包升级到最新的可用版本
python3 -m pip install -U cryptography
再去查看报错就消失了。

原文参考:
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。