Skip to content

protobuf version error #37

Open
Open
@rlskoeser

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions