Closed MatthewABrantley closed 2 years ago
Does a newer version of protobuf work? Or does it have to be 3.20.1
?
No it doesn't seem like it. I changed it to 4.21.1 and got this error:
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).
Hmm interesting. But you are pinning it to 3.20.1
. I will investigate further over the weekend.
I am pinning 3.20.1 because of the thread I linked, but I lack the understanding of why that worked or if there's a better solution.
I ran into this issue when installing requirements.txt into a python env. https://github.com/protocolbuffers/protobuf/issues/10051
I resolved it by adding:
protobuf==3.20.1
to requirements.txt, I have no idea if this is the correct fix, so not sending this as a PR.