skein icon indicating copy to clipboard operation
skein copied to clipboard

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

Open Seanspt opened this issue 3 years ago • 4 comments

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'

Seanspt avatar Mar 04 '21 07:03 Seanspt

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

quasiben avatar Mar 04 '21 14:03 quasiben

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

jcrist avatar Mar 04 '21 14:03 jcrist

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']

Seanspt avatar Mar 05 '21 01:03 Seanspt

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
>>>

jameskrach avatar Aug 18 '21 16:08 jameskrach