skein
skein copied to clipboard
AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key
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'
Can you elaborate on how this error came up ? Or better yet, build a minimal reproducer ?
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
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']
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
>>>