Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key #230

Open
Seanspt opened this issue Mar 4, 2021 · 4 comments

Comments

@Seanspt
Copy link

Seanspt commented Mar 4, 2021

We upgrade to the latest version 0.8.1, which seems to bring an error.

AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'
@quasiben
Copy link

quasiben commented Mar 4, 2021

Can you elaborate on how this error came up ? Or better yet, build a minimal reproducer ?

@jcrist
Copy link
Owner

jcrist commented Mar 4, 2021

A quick search shows this is likely due to an older version of protobuf in your environment. Can to you try upgrading protobuf and see if that fixes things?

pip install -U protobuf

@Seanspt
Copy link
Author

Seanspt commented Mar 5, 2021

A quick search shows this is likely due to an older version of protobuf in your environment. Can to you try upgrading protobuf and see if that fixes things?

pip install -U protobuf

It works. Thanks. Should the requirements be updated either? Maybe a higher version of pb.

install_requires = ['grpcio>=1.11.0',
                    'protobuf>=3.5.0',
                    'pyyaml',
                    'cryptography']

@jameskrach
Copy link

jameskrach commented Aug 18, 2021

I've also run into this issue. protobuf==3.12.2 is the minimum version that does not raise this error.

A MWE follows:

# python 3.7 - 3.9 raise this error
$ python -m venv .venv
$ source .venv/bin/activate
$ python -m pip install skein==0.8.1 protobuf==3.11.2
...
$ python
...
>>> import skein
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  ...
    create_key=_descriptor._internal_create_key,
AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'
>>>
$ python -m pip install protobuf==3.12.2
$ python
...
>>> import skein
>>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants