How to avoid: TypeError: Descriptors cannot not be created directly. But leave the last protobuf version in project

109 Views Asked by At

I have grpc server that uses protobuf and needs version 3.20.x or lower.

Also in the project I connect to mysql 8 and it requires a later version.

How can I connect this in one project?

Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python is the only variant? Or is it possible to somehow use different versions of protobuf in one code? (to grpc 3.20, to mysql 4.20)

I know only about Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION

0

There are 0 best solutions below