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
Description: When running cromshell, the following error occurs: "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." The error message suggests that the issue may be due to an incompatible version of the protobuf package.
Steps to reproduce:
Install cromshell via PYPI.
Run cromshell in a terminal or command prompt.
Observe the "Descriptors cannot not be created directly" error.
Expected behavior: cromshell should run without errors.
Suggested solution:
Temporary solution: Updating the google-api-core package seemed to work pip install --upgrade google-api-core
Long-term solution: Could add the google-api-core package requirement for cromshell to "google-api-core>=2.11"
$ cromshell
Please update the cromwell server in the following config file /home/jupyter/.cromshell/cromshell_config.json
Traceback (most recent call last):
File "/home/jupyter/.local/bin/cromshell", line 5, in <module>
from cromshell.__main__ import main_entry
File "/home/jupyter/.local/lib/python3.7/site-packages/cromshell/__main__.py", line 11, in <module>
from .cost import command as cost
File "/home/jupyter/.local/lib/python3.7/site-packages/cromshell/cost/command.py", line 6, in <module>
from google.cloud import bigquery
File "/home/jupyter/.local/lib/python3.7/site-packages/google/cloud/bigquery/__init__.py", line 35, in <module>
from google.cloud.bigquery.client import Client
File "/home/jupyter/.local/lib/python3.7/site-packages/google/cloud/bigquery/client.py", line 60, in <module>
import google.api_core.exceptions as core_exceptions
File "/opt/conda/lib/python3.7/site-packages/google/api_core/exceptions.py", line 29, in <module>
from google.rpc import error_details_pb2
File "/opt/conda/lib/python3.7/site-packages/google/rpc/error_details_pb2.py", line 69, in <module>
create_key=_descriptor._internal_create_key,
File "/home/jupyter/.local/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 561, 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:
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
The text was updated successfully, but these errors were encountered:
bshifaw
changed the title
Error creating descriptor in cromshell due to incompatible protobuf version
Error running cromshell due to incompatible protobuf version
May 2, 2023
Description: When running cromshell, the following error occurs: "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." The error message suggests that the issue may be due to an incompatible version of the protobuf package.
Steps to reproduce:
Install cromshell via PYPI.
Run cromshell in a terminal or command prompt.
Observe the "Descriptors cannot not be created directly" error.
Expected behavior: cromshell should run without errors.
Suggested solution:
Temporary solution: Updating the google-api-core package seemed to work
pip install --upgrade google-api-core
Long-term solution: Could add the google-api-core package requirement for cromshell to
"google-api-core>=2.11"
The text was updated successfully, but these errors were encountered: