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.
If when running the tool you get a stack trace ending in this error...
... it is because package
protochad 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 frommediapipe.Running
pip install protobuf==3.12(to exceedmediapipe's requirement ofprotobuf>=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.