I’m trying to get inference from Triton server using the client_image.py but I’m consistently getting the error message below:
Traceback (most recent call last):
File “./…/clients/python/image_client.py”, line 37, in
import tritonclient.grpc as grpcclient
File “/usr/local/lib/python3.8/dist-packages/tritonclient/grpc/init.py”, line 41, in
from tritonclient.grpc import model_config_pb2
File “/usr/local/lib/python3.8/dist-packages/tritonclient/grpc/model_config_pb2.py”, line 33, in
_descriptor.EnumValueDescriptor(
File “/usr/local/lib/python3.8/dist-packages/google/protobuf/descriptor.py”, line 755, in new
_message.Message._CheckCalledFromGeneratedFile()
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:
- Downgrade the protobuf package to 3.20.x or lower.
- Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
Any clue on how to fix it