Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

pyasn1 import error in Google Compute Engine #229

Description

@hiranya911

Saw the following error when trying to import firebase_admin in a GCE instance:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/firebase_admin/__init__.py", line 22, in <module>
    from firebase_admin import credentials
  File "/usr/local/lib/python2.7/dist-packages/firebase_admin/credentials.py", line 23, in <module>
    from google.oauth2 import service_account
  File "/usr/local/lib/python2.7/dist-packages/google/oauth2/service_account.py", line 77, in <module>
    from google.auth import _service_account_info
  File "/usr/local/lib/python2.7/dist-packages/google/auth/_service_account_info.py", line 22, in <module>
    from google.auth import crypt
  File "/usr/local/lib/python2.7/dist-packages/google/auth/crypt/__init__.py", line 39, in <module>
    from google.auth.crypt import rsa
  File "/usr/local/lib/python2.7/dist-packages/google/auth/crypt/rsa.py", line 17, in <module>
    from google.auth.crypt import _python_rsa
  File "/usr/local/lib/python2.7/dist-packages/google/auth/crypt/_python_rsa.py", line 29, in <module>
    from pyasn1_modules.rfc2459 import Certificate
  File "/usr/local/lib/python2.7/dist-packages/pyasn1_modules/rfc2459.py", line 20, in <module>
    from pyasn1.type import opentype
ImportError: cannot import name opentype

I later installed google-auth-oauthlib on the same instance, which pulled in some missing pyasn modules after which the problem went away. Should google-auth update its dependency declarations so this won't happen again?

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.triage meI really want to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions