payload_dumper icon indicating copy to clipboard operation
payload_dumper copied to clipboard

Pin maximum protobuf version to 3.20.1

Open danyeaw opened this issue 3 years ago • 2 comments

I am getting an error if I don't pin a maximum protobuf version:

Traceback (most recent call last):
  File "/home/dan/Projects/payload_dumper/payload_dumper.py", line 15, in <module>
    import update_metadata_pb2 as um
  File "/home/dan/Projects/payload_dumper/update_metadata_pb2.py", line 33, in <module>
    _descriptor.EnumValueDescriptor(
  File "/home/dan/Projects/payload_dumper/.venv/lib/python3.10/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).

danyeaw avatar Jun 17 '22 22:06 danyeaw

I came to the same conclusion after much debugging. Was about to make a PR myself haha

Frontesque avatar Jul 03 '22 16:07 Frontesque

@vm03 could we please merge this? Thanks!

danyeaw avatar Jul 03 '22 21:07 danyeaw

sorry for long time :)

vm03 avatar Feb 04 '23 18:02 vm03