handprint
handprint copied to clipboard
protobuf version error
I got the following error running handprint when I tried to use it (running with -l
and adding credentials did not trigger).
The error displayed after this line of output:
Sending to google and waiting for response ...
In case it matters or helps, I ran handprint with -s google
to only run against google because I haven't set up credentials for the other services yet.
An error occurred (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
I checked the installed version of protobuf package, and then downgraded.
% pip freeze | grep protobuf
protobuf==4.21.3
% pip install "protobuf<=3.20"
Downgrading resolved the error.
Thanks for the report. Protobuf is not a direct dependency of handprint, which means it's coming from one of the Google packages. I'll investigate.