Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

ERROR: 'OpenSSL.crypto' has no attribute 'sign'

Aberta
#2,554 8 comentários 22 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@chalmerlowe já está trabalhando nisso.

Desde 7/4/2026.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

priority: p3 type: bug
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-client version: 2.159.0
Steps to reproduce
  1. Install google-api-python-client with pip, pdm, poetry, hatch... it doesn't matter
  2. Use the method oauth to authenticate
    from oauth2client.service_account import ServiceAccountCredentials
  3. use .execute() method of any googleapi method
  4. 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.

Linguagem predominante
Python
Estrelas
8.9k
Forks
2.6k
Merge médio
9h 58min
PRs com merge (30d)
6

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de googleapis/google-api-python-client

Todas as issues de googleapis/google-api-python-client

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.