You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to import siphon.cdmr.dataset, I receive this error:
TypeError: Descriptors cannot 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
My protobuf package is 4.25.2.
It can be fixed by either downgrading the protobuf package to 3.20.0 or adding these codes before the import statement:
importgoogle.protobuf.internal.api_implementationasapiapi._implementation_type='python'importsiphon.cdmr.datasetasdataset# now everything works fine.
But according to protobuf docs, this API is not recommend to use.
The text was updated successfully, but these errors were encountered:
When I try to import
siphon.cdmr.dataset
, I receive this error:TypeError: Descriptors cannot 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
My protobuf package is 4.25.2.
It can be fixed by either downgrading the protobuf package to 3.20.0 or adding these codes before the import statement:
But according to protobuf docs, this API is not recommend to use.
The text was updated successfully, but these errors were encountered: