ERROR: 'OpenSSL.crypto' has no attribute 'sign'
Chưa có ai nhận issue này.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 8.9k
- Fork
- 2.6k
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 16
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của googleapis/google-api-python-client
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
test: connection leak test test_discovery_http_is_closed is shadowed and syntactically invalid Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
เมตาแมส Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 10/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Tất cả issue của googleapis/google-api-python-client
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·