TypeError: expected bytes, Descriptor found
11,093
Try this, worked for me
pip install protobuf-py3
pip install --upgrade protobuf
Author by
ogzgrn
Updated on June 04, 2022Comments
-
ogzgrn almost 2 years
How do I fix the following error traceback regarding
tf.record
?(tensorflow1) c:\tensorflow1\models\research\object_detection>python generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=data/train.record --image_dir=(image directory) Traceback (most recent call last): File "generate_tfrecord.py", line 17, in <module> import tensorflow as tf File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\__init__.py", line 24, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\__init__.py", line 52, in <module> from tensorflow.core.framework.graph_pb2 import * File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 15, in <module> from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2 File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\node_def_pb2.py", line 15, in <module> from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2 File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\attr_value_pb2.py", line 15, in <module> from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2 File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\tensor_pb2.py", line 15, in <module> from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2 File "C:\Users\Dell-Oguz\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\core\framework\resource_handle_pb2.py", line 91, in <module> __module__ = 'tensorflow.core.framework.resource_handle_pb2' TypeError: expected bytes, Descriptor found
-
Admin about 4 yearsi am facing the same error. I figured it out by reading this site: github.com/tensorflow/tensorflow/issues/35208 Hope it helps!
-
-
ogzgrn over 4 yearsHi I did "conda uninstall -c anaconda tensorflow-gpu", then I run "conda install -c anaconda tensorflow-gpu" but I get same error. Could you give detail?
-
Mahmut Çakar over 4 yearsRemove environment with
conda remove --name myenv --all
then create new environmentconda create -n mynewenv python=3.6
. Then runactivate mynewenv
andconda install -c anaconda tensorflow-gpu
-
Mahmut Çakar over 4 yearsI am not sure why it is not fixed. You can try install cuda, cudnn and keras step by step. Check below links. first install cuda; developer.nvidia.com/cuda-downloads (I recommend 10.0 or 10.1) docs.nvidia.com/deeplearning/sdk/cudnn-install/… after that try pip install tensorflow-gpu
-
Pushkaraj Joshi over 3 yearsWorked for me but gave me another error. Referring to this answer to solve the problem I'm currently facing stackoverflow.com/questions/60423758/…