ERROR: 'OpenSSL.crypto' has no attribute 'sign'
Nessuno ha ancora preso questa issue.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 8.9k
- Fork
- 2.6k
- Merge medio
- 2g 1h
- PR unite (30g)
- 16
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di googleapis/google-api-python-client
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
test: connection leak test test_discovery_http_is_closed is shadowed and syntactically invalid Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
เมตาแมส Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 10/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
Tutte le issue di googleapis/google-api-python-client
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
stephrobert/dsoxlab#238 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sublimehq/package_control#1780 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
nwg-piotr/nwg-displays#145 ·