nicknochnack / RealTimeAutomaticNumberPlateRecognition

123 stars 139 forks source link

Not working on Google colab #6

Open hammad2008 opened 1 year ago

hammad2008 commented 1 year ago

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

Elham-Keshavarz commented 1 year ago

@hammad2008 Could you send google colab Error?

Adarsh-Saurabh commented 1 year ago

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 commented 1 year ago

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