Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on Google colab #6

Open
hammad2008 opened this issue Oct 1, 2022 · 3 comments
Open

Not working on Google colab #6

hammad2008 opened this issue Oct 1, 2022 · 3 comments

Comments

@hammad2008
Copy link

Hello, i hope you are doing well.
I am trying to run this on google colab but its gives the error

@Elham-Keshavarz
Copy link

@hammad2008 Could you send google colab Error?

@Adarsh-Saurabh
Copy link

Adarsh-Saurabh commented May 29, 2023


TypeError Traceback (most recent call last)
in <cell line: 2>()
1 import tensorflow as tf
----> 2 from object_detection.utils import config_util
3 from object_detection.protos import pipeline_pb2
4 from google.protobuf import text_format

2 frames
/usr/local/lib/python3.10/dist-packages/google/protobuf/descriptor.py in new(cls, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options, serialized_options, has_default_value, containing_oneof, json_name, file, create_key)
559 has_default_value=True, containing_oneof=None, json_name=None,
560 file=None, create_key=None): # pylint: disable=redefined-builtin
--> 561 _message.Message._CheckCalledFromGeneratedFile()
562 if is_extension:
563 return _message.default_pool.FindExtensionByName(full_name)

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

This is the error in google colab in the line from object_detection.utils import config_util

@logan-pipes
Copy link

pip install protobuf==3.20.3 solved that issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants