ERROR: 'OpenSSL.crypto' has no attribute 'sign'
还没有人认领这个 Issue。
评估
这个 Issue 还没有评估数据。
描述
Environment details
- OS type and version: ubuntu:20.04 and macOs 14.7.1
- Python version: 3.11
- pip version: I dont use pip y use Poetry 1.5.1
google-api-python-clientversion: 2.159.0
Steps to reproduce
- Install google-api-python-client with pip, pdm, poetry, hatch... it doesn't matter
- Use the method oauth to authenticate
from oauth2client.service_account import ServiceAccountCredentials - use .execute() method of any googleapi method
- this retrieves the error 'OpenSSL.crypto' has no attribute 'sign'
Why does this happen?
Because you are importing oauth2client on the line https://github.com/googleapis/google-api-python-client/blob/main/googleapiclient/_auth.py#L33 and it is deprecated, oauth2client uses openssl with the method sign and openssl removed the method sign on the version 24.3.0.
So if you install openssl >= 24.3.0, and if you use the oauth2client.service_account from googleapiclient this will retrieves you the error
ERROR: module 'OpenSSL.crypto' has no attribute 'sign'
How to solves this?
Set a constraint of openssl >= 24.3.0 on googleapiclient or dont import oauth2client on googleapi anymore.
- 主要语言
- Python
- 星标
- 8.9k
- 派生
- 2.6k
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 16
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
googleapis/google-api-python-client 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 92/100
-
เมตาแมส 未关闭
难度 1/5 1 小时以内 新手友好度 10/100
-
难度 4/5 3-5 天 新手友好度 52/100
查看 googleapis/google-api-python-client 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
stephrobert/dsoxlab#238 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
sublimehq/package_control#1780 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
nwg-piotr/nwg-displays#145 ·