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

installing tablestore package results in protobuf > 3.20.x which alerts code regeneration is needed #16

Open
noti opened this issue May 31, 2022 · 1 comment

Comments

@noti
Copy link

noti commented May 31, 2022

When I install latest package 5.2.1, it installed protobuf > 3.20.x which resulted in the following error:

File "/app/.tox/py38/lib/python3.8/site-packages/tablestore/__init__.py", line 115, in <module>
    from tablestore.client import OTSClient
  File "/app/.tox/py38/lib/python3.8/site-packages/tablestore/client.py", line 25, in <module>
    from tablestore.protocol import OTSProtocol
  File "/app/.tox/py38/lib/python3.8/site-packages/tablestore/protocol.py", line 25, in <module>
    from tablestore.encoder import OTSProtoBufferEncoder
  File "/app/.tox/py38/lib/python3.8/site-packages/tablestore/encoder.py", line 7, in <module>
    from tablestore.metadata import *
  File "/app/.tox/py38/lib/python3.8/site-packages/tablestore/metadata.py", line 6, in <module>
    import tablestore.protobuf.search_pb2 as search_pb2
  File "/app/.tox/py38/lib/python3.8/site-packages/tablestore/protobuf/search_pb2.py", line 33, in <module>
    _descriptor.EnumValueDescriptor(
  File "/app/.tox/py38/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 755, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

@ericstone57
Copy link

seems no one maintain this sdk anymore, great!

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

2 participants