ERROR: 'OpenSSL.crypto' has no attribute 'sign'
@chalmerlowe is already working on this.
Since Apr 7, 2026.
Assessment
This issue has not been assessed yet.
Description
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.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 2.6k
- Avg merge
- 28m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/google-api-python-client
-
fix: @_helpers.positional raises TypeError when decorating functions without default argumentsPossibly taken @codeXsidd claimed this 22 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Disable prettyPrint by default for Google Sheets API responsesPossibly taken @pawciobiel claimed this 91 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
test: connection leak test test_discovery_http_is_closed is shadowed and syntactically invalidPossibly taken @Capstan claimed this 167 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
googleapis/google-api-python-client#2757 · 1 comment ·
-
test: strict positional parameter enforcement is ignored under pytestPossibly taken @Capstan claimed this 167 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
All issues in googleapis/google-api-python-client
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
cpp-best-practices/project_validator#267 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Project-N-E-K-O/N.E.K.O#3725 ·
Maintainers usually reply within 1 day
-
[Bug] Sending a Telegram message chain twice duplicates mentionsPossibly taken @123XieC claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AstrBotDevs/AstrBot#11125 ·
Maintainers usually reply within 1 day
-
backend bug priority: high
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nooriegarg/ContribIQ#73 ·
Maintainers usually reply within 1 day
-
bug p3 security
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day