Skip to content

protobuf maximum version supported #1

@Tiogshi

Description

@Tiogshi

If when running the tool you get a stack trace ending in 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).

... it is because package protoc had a breaking change in a major version release recently (circa 2022-05-06), but pip is likely to install it by default anyway to satisfy the dependency on it from mediapipe.

Running pip install protobuf==3.12 (to exceed mediapipe's requirement of protobuf>=3.11.4) fixed it for me... I don't know if it will fix it for others, but wanted to leave a breadcrumb for them to find.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions