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

got an unexpected keyword argument "serialized_options", centos 7 #3995

Closed
InomjonRamatov opened this issue Apr 17, 2018 · 37 comments
Closed

got an unexpected keyword argument "serialized_options", centos 7 #3995

InomjonRamatov opened this issue Apr 17, 2018 · 37 comments
Assignees

Comments

@InomjonRamatov
Copy link

@InomjonRamatov InomjonRamatov commented Apr 17, 2018

Please go to Stack Overflow for help and support:

http://stackoverflow.com/questions/tagged/tensorflow

Also, please understand that many of the models included in this repository are experimental and research-style code. If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.

Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.


System information

  • What is the top-level directory of the model you are using:
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • TensorFlow installed from (source or binary):
  • TensorFlow version (use command below):
  • Bazel version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:
  • Exact command to reproduce:

You can collect some of this information using our environment capture script:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh

You can obtain the TensorFlow version with

python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

Describe the problem

Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.

Source code / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.

@InomjonRamatov InomjonRamatov changed the title got an unexpected keyword argument "serialized_options" got an unexpected keyword argument "serialized_options", centos 7 Apr 17, 2018
@InomjonRamatov

This comment has been minimized.

Copy link
Author

@InomjonRamatov InomjonRamatov commented Apr 17, 2018

how to fix the issue??? please help

@InomjonRamatov

This comment has been minimized.

Copy link
Author

@InomjonRamatov InomjonRamatov commented Apr 17, 2018

Traceback (most recent call last):
File "object_detection/builders/model_builder_test.py", line 21, in
from object_detection.builders import model_builder
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/builders/model_builder.py", line 17, in
from object_detection.builders import anchor_generator_builder
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/builders/anchor_generator_builder.py", line 21, in
from object_detection.protos import anchor_generator_pb2
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/protos/anchor_generator_pb2.py", line 15, in
from object_detection.protos import grid_anchor_generator_pb2 as object__detection_dot_protos_dot_grid__anchor__generator__pb2
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/protos/grid_anchor_generator_pb2.py", line 22, in
serialized_pb=_b('\n3object_detection/protos/grid_anchor_generator.proto\x12\x17object_detection.protos"\xcd\x01\n\x13GridAnchorGenerator\x12\x13\n\x06height\x18\x01 \x01(\x05:\x03\x32\x35\x36\x12\x12\n\x05width\x18\x02 \x01(\x05:\x03\x32\x35\x36\x12\x19\n\rheight_stride\x18\x03 \x01(\x05:\x02\x31\x36\x12\x18\n\x0cwidth_stride\x18\x04 \x01(\x05:\x02\x31\x36\x12\x18\n\rheight_offset\x18\x05 \x01(\x05:\x01\x30\x12\x17\n\x0cwidth_offset\x18\x06 \x01(\x05:\x01\x30\x12\x0e\n\x06scales\x18\x07 \x03(\x02\x12\x15\n\raspect_ratios\x18\x08 \x03(\x02')
TypeError: new() got an unexpected keyword argument 'serialized_options'
(py35) [root@localhost research]#
(py35) [root@localhost research]# python object_detection/builders/model_builder_test.py
Traceback (most recent call last):
File "object_detection/builders/model_builder_test.py", line 21, in
from object_detection.builders import model_builder
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/builders/model_builder.py", line 17, in
from object_detection.builders import anchor_generator_builder
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/builders/anchor_generator_builder.py", line 21, in
from object_detection.protos import anchor_generator_pb2
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/protos/anchor_generator_pb2.py", line 15, in
from object_detection.protos import grid_anchor_generator_pb2 as object__detection_dot_protos_dot_grid__anchor__generator__pb2
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/protos/grid_anchor_generator_pb2.py", line 22, in
serialized_pb=_b('\n3object_detection/protos/grid_anchor_generator.proto\x12\x17object_detection.protos"\xcd\x01\n\x13GridAnchorGenerator\x12\x13\n\x06height\x18\x01 \x01(\x05:\x03\x32\x35\x36\x12\x12\n\x05width\x18\x02 \x01(\x05:\x03\x32\x35\x36\x12\x19\n\rheight_stride\x18\x03 \x01(\x05:\x02\x31\x36\x12\x18\n\x0cwidth_stride\x18\x04 \x01(\x05:\x02\x31\x36\x12\x18\n\rheight_offset\x18\x05 \x01(\x05:\x01\x30\x12\x17\n\x0cwidth_offset\x18\x06 \x01(\x05:\x01\x30\x12\x0e\n\x06scales\x18\x07 \x03(\x02\x12\x15\n\raspect_ratios\x18\x08 \x03(\x02')
TypeError: new() got an unexpected keyword argument 'serialized_options'

@k-w-w

This comment has been minimized.

Copy link
Member

@k-w-w k-w-w commented Apr 17, 2018

I apologize, but I am having a hard time understanding what the problem is, where the problem is, and what version it affects. Please resubmit and pay attention to the issue template (https://github.com/tensorflow/tensorflow/issues/new). Please provide all the information it asks. Thank you.

@k-w-w k-w-w closed this Apr 17, 2018
@vivekbhadouria

This comment has been minimized.

Copy link

@vivekbhadouria vivekbhadouria commented Apr 18, 2018

I too had this issue when I was compiling my protobuf with protoc version 3.5.x. But, when I changed my protoc version to 3.4.0, the problem vanished.

@Bahramudin

This comment has been minimized.

Copy link

@Bahramudin Bahramudin commented May 10, 2018

@vivekbhadouria how did you install the 3.4.0, I also have the same problem with object-detection-api, which lower version not working and newer version also not working, I think the middle version will work, so I don't know how to install 3.4.0, now the installed version is 3.5.1, not working, I have installed it from source. Thanks!!

@vivekbhadouria

This comment has been minimized.

Copy link

@vivekbhadouria vivekbhadouria commented May 10, 2018

@Bahramudin If I remember correctly then I first removed the protoc installed on my machine, then you install the required version i.e. 3.4.0.
Can you try below mentioned commands to install? I remember I noted these lines from SO but I forgot the link

# Grab the version you need
curl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip
# Unzip
unzip protoc-3.4.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
sudo mv protoc3/include/* /usr/local/include/

After performing above steps, please run protoc --version to cross-check the installation. HTH

@Bahramudin

This comment has been minimized.

Copy link

@Bahramudin Bahramudin commented May 10, 2018

@vivekbhadouria Thanks! problem has been solved by installing protobuf 3.4.0.

@keevee09

This comment has been minimized.

Copy link

@keevee09 keevee09 commented Jun 26, 2018

pip install -U protobuf

worked for me. It updated protobuf to v3.6

@MuhammedBuyukkinaci

This comment has been minimized.

Copy link

@MuhammedBuyukkinaci MuhammedBuyukkinaci commented Jun 26, 2018

pip install -U protobuf worked for me too. Thanks @keevee09 .

@roffel

This comment has been minimized.

Copy link
Contributor

@roffel roffel commented Jul 5, 2018

Thanks a lot @keevee09, it worked!

@Sawatdatta

This comment has been minimized.

Copy link

@Sawatdatta Sawatdatta commented Jul 5, 2018

Do I need to rebuild tensorflow and install after upgrading to protobuf 3.6.0?

@sujaybabruwad

This comment has been minimized.

Copy link

@sujaybabruwad sujaybabruwad commented Jul 15, 2018

make sure to compile the Protobuf libraries again @Sawatdatta

@JackShaw2333

This comment has been minimized.

Copy link

@JackShaw2333 JackShaw2333 commented Aug 6, 2018

Why protoc 3.4.0 doesn't work for me? (win10)
I still get TypeError: __new__() got an unexpected keyword argument 'serialized_options'

@SenhorCastor

This comment has been minimized.

Copy link

@SenhorCastor SenhorCastor commented Aug 11, 2018

Same here:

protoc --version
libprotoc 3.4.0

bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
...
...
INFO: Found 1 target...
ERROR: /Users/fernandomartin/projects/tensorflow/tensorflow/BUILD:581:1: Executing genrule //tensorflow:tensorflow_python_api_gen failed (Exit 1)
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_fernandomartin/86a50f68aec4b46d60ac0b40b849c4a9/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/private/var/tmp/_bazel_fernandomartin/86a50f68aec4b46d60ac0b40b849c4a9/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/private/var/tmp/_bazel_fernandomartin/86a50f68aec4b46d60ac0b40b849c4a9/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/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 "/private/var/tmp/_bazel_fernandomartin/86a50f68aec4b46d60ac0b40b849c4a9/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/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 "/private/var/tmp/_bazel_fernandomartin/86a50f68aec4b46d60ac0b40b849c4a9/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/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 "/private/var/tmp/_bazel_fernandomartin/86a50f68aec4b46d60ac0b40b849c4a9/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/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 "/private/var/tmp/_bazel_fernandomartin/86a50f68aec4b46d60ac0b40b849c4a9/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/core/framework/resource_handle_pb2.py", line 22, in <module>
    serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\"r\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tBn\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01Z=github.com/tensorflow/tensorflow/tensorflow/go/core/framework\xf8\x01\x01\x62\x06proto3')
TypeError: __init__() got an unexpected keyword argument 'serialized_options'
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.960s, Critical Path: 0.45s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

macOs 10.13.16
python 2.7.13

@rahulbhalley

This comment has been minimized.

Copy link

@rahulbhalley rahulbhalley commented Oct 6, 2018

@SenhorCastor Just uninstall and then reinstall the protobuf.

sudo pip uninstall protobuf
sudo pip install -U protobuf

For me this worked!

@hanlaoshi

This comment has been minimized.

Copy link

@hanlaoshi hanlaoshi commented Oct 14, 2018

@SenhorCastor只需卸载然后重新安装protobuf即可

sudo pip uninstall protobuf
sudo pip install -U protobuf

对我来说这很有效!

这对我来说还是不行

@Bahramudin

This comment has been minimized.

Copy link

@Bahramudin Bahramudin commented Oct 14, 2018

@hanlaoshi Please write in English!!!!

@hanlaoshi

This comment has been minimized.

Copy link

@hanlaoshi hanlaoshi commented Oct 15, 2018

This is still not work for me.

@rahulbhalley

This comment has been minimized.

Copy link

@rahulbhalley rahulbhalley commented Oct 15, 2018

This is still not work for me.

@hanlaoshi What error are you getting?

@rahulbhalley

This comment has been minimized.

Copy link

@rahulbhalley rahulbhalley commented Oct 15, 2018

@hanlaoshi Please write in English!!!!

@Bahramudin use deep learning to translate. @hanlaoshi said, "This is still not good for me". I used Google Translate. 😅

@wei-v-wang

This comment has been minimized.

Copy link
Contributor

@wei-v-wang wei-v-wang commented Oct 22, 2018

@hanlaoshi Try "sudo pip uninstall protobuf", then "pip install protobuf" without sudo.
In my case, protobuf was installed with default root account and I had to issue "pip uninstall" with and without sudo.
Then make sure you have one protobuf version (google/protobuf installed in TF installation directory).
If you have errors like below
"ImportError: No module named google.protobuf"
create a "__init__.py" under google directory.

Tested with TF v1.11 and needed the above workaround.

@Arlenmbx

This comment has been minimized.

Copy link

@Arlenmbx Arlenmbx commented Oct 28, 2018

Why pip install -U protobuf is not useful for me?

@Arlenmbx

This comment has been minimized.

Copy link

@Arlenmbx Arlenmbx commented Oct 29, 2018

Both tensorflow v1.10 and v1.11 have this problem. V1.8.0 works for me.

@loretoparisi

This comment has been minimized.

Copy link

@loretoparisi loretoparisi commented Nov 15, 2018

I'm having the same issue with TF v1.8 and protobuf

(.env) ip-192-168-22-127:Wave-U-Net loretoparisi$ pip show protobuf
Name: protobuf
Version: 3.6.1
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: None
Author-email: None
License: 3-Clause BSD License
Location: /Library/Python/2.7/site-packages
Requires: six, setuptools
Required-by: tensorflow, tensorboard
(.env) ip-192-168-22-127:Wave-U-Net loretoparisi$ pip show tensorflow
Name: tensorflow
Version: 1.12.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /Library/Python/2.7/site-packages
Requires: enum34, keras-preprocessing, wheel, astor, backports.weakref, mock, tensorboard, termcolor, protobuf, gast, absl-py, grpcio, six, keras-applications, numpy
Required-by: 
env) ip-192-168-22-127:Wave-U-Net loretoparisi$ python Predict.py with cfg.baseline_stereo
Traceback (most recent call last):
  File "Predict.py", line 3, in <module>
    import Evaluate
  File "/Users/loretoparisi/Documents/Projects/AI/Wave-U-Net/Evaluate.py", line 2, in <module>
    import tensorflow as tf
  File "/Library/Python/2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/Library/Python/2.7/site-packages/tensorflow/python/__init__.py", line 59, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/Library/Python/2.7/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 "/Library/Python/2.7/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 "/Library/Python/2.7/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 "/Library/Python/2.7/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 "/Library/Python/2.7/site-packages/tensorflow/core/framework/resource_handle_pb2.py", line 22, in <module>
    serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\"r\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tBn\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01Z=github.com/tensorflow/tensorflow/tensorflow/go/core/framework\xf8\x01\x01\x62\x06proto3')
TypeError: __init__() got an unexpected keyword argument 'serialized_options'
@lugq1990

This comment has been minimized.

Copy link

@lugq1990 lugq1990 commented Dec 7, 2018

I also encounter this problem. For me use protobuf=3.6.0 will work(previous is 3.6.1).
pip install protobuf==3.6.0

@samiarja

This comment has been minimized.

Copy link

@samiarja samiarja commented Dec 17, 2018

@SenhorCastor Just uninstall and then reinstall the protobuf.

sudo pip uninstall protobuf
sudo pip install -U protobuf

For me this worked! Thanksssssss

@yuanxiangxie

This comment has been minimized.

Copy link

@yuanxiangxie yuanxiangxie commented Dec 28, 2018

I'm having the same issue with TF v1.8 and protobuf

(.env) ip-192-168-22-127:Wave-U-Net loretoparisi$ pip show protobuf
Name: protobuf
Version: 3.6.1
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: None
Author-email: None
License: 3-Clause BSD License
Location: /Library/Python/2.7/site-packages
Requires: six, setuptools
Required-by: tensorflow, tensorboard
(.env) ip-192-168-22-127:Wave-U-Net loretoparisi$ pip show tensorflow
Name: tensorflow
Version: 1.12.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /Library/Python/2.7/site-packages
Requires: enum34, keras-preprocessing, wheel, astor, backports.weakref, mock, tensorboard, termcolor, protobuf, gast, absl-py, grpcio, six, keras-applications, numpy
Required-by: 
env) ip-192-168-22-127:Wave-U-Net loretoparisi$ python Predict.py with cfg.baseline_stereo
Traceback (most recent call last):
  File "Predict.py", line 3, in <module>
    import Evaluate
  File "/Users/loretoparisi/Documents/Projects/AI/Wave-U-Net/Evaluate.py", line 2, in <module>
    import tensorflow as tf
  File "/Library/Python/2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/Library/Python/2.7/site-packages/tensorflow/python/__init__.py", line 59, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "/Library/Python/2.7/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 "/Library/Python/2.7/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 "/Library/Python/2.7/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 "/Library/Python/2.7/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 "/Library/Python/2.7/site-packages/tensorflow/core/framework/resource_handle_pb2.py", line 22, in <module>
    serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\"r\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tBn\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01Z=github.com/tensorflow/tensorflow/tensorflow/go/core/framework\xf8\x01\x01\x62\x06proto3')
TypeError: __init__() got an unexpected keyword argument 'serialized_options'

Hi,I have the same problem, but downgrade tensorflow to 1.9.0, and it worked

@Hikaon

This comment has been minimized.

Copy link

@Hikaon Hikaon commented Feb 13, 2019

This is an issue with protobuf, read this comment please: protocolbuffers/protobuf#4716 (comment)

@iodncookie

This comment has been minimized.

Copy link

@iodncookie iodncookie commented Feb 27, 2019

Traceback (most recent call last):
File "object_detection/builders/model_builder_test.py", line 21, in
from object_detection.builders import model_builder
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/builders/model_builder.py", line 17, in
from object_detection.builders import anchor_generator_builder
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/builders/anchor_generator_builder.py", line 21, in
from object_detection.protos import anchor_generator_pb2
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/protos/anchor_generator_pb2.py", line 15, in
from object_detection.protos import grid_anchor_generator_pb2 as object__detection_dot_protos_dot_grid__anchor__generator__pb2
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/protos/grid_anchor_generator_pb2.py", line 22, in
serialized_pb=_b('\n3object_detection/protos/grid_anchor_generator.proto\x12\x17object_detection.protos"\xcd\x01\n\x13GridAnchorGenerator\x12\x13\n\x06height\x18\x01 \x01(\x05:\x03\x32\x35\x36\x12\x12\n\x05width\x18\x02 \x01(\x05:\x03\x32\x35\x36\x12\x19\n\rheight_stride\x18\x03 \x01(\x05:\x02\x31\x36\x12\x18\n\x0cwidth_stride\x18\x04 \x01(\x05:\x02\x31\x36\x12\x18\n\rheight_offset\x18\x05 \x01(\x05:\x01\x30\x12\x17\n\x0cwidth_offset\x18\x06 \x01(\x05:\x01\x30\x12\x0e\n\x06scales\x18\x07 \x03(\x02\x12\x15\n\raspect_ratios\x18\x08 \x03(\x02')
TypeError: new() got an unexpected keyword argument 'serialized_options'
(py35) [root@localhost research]#
(py35) [root@localhost research]# python object_detection/builders/model_builder_test.py
Traceback (most recent call last):
File "object_detection/builders/model_builder_test.py", line 21, in
from object_detection.builders import model_builder
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/builders/model_builder.py", line 17, in
from object_detection.builders import anchor_generator_builder
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/builders/anchor_generator_builder.py", line 21, in
from object_detection.protos import anchor_generator_pb2
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/protos/anchor_generator_pb2.py", line 15, in
from object_detection.protos import grid_anchor_generator_pb2 as object__detection_dot_protos_dot_grid__anchor__generator__pb2
File "/root/anaconda3/envs/py35/lib/python3.5/site-packages/object_detection-0.1-py3.5.egg/object_detection/protos/grid_anchor_generator_pb2.py", line 22, in
serialized_pb=_b('\n3object_detection/protos/grid_anchor_generator.proto\x12\x17object_detection.protos"\xcd\x01\n\x13GridAnchorGenerator\x12\x13\n\x06height\x18\x01 \x01(\x05:\x03\x32\x35\x36\x12\x12\n\x05width\x18\x02 \x01(\x05:\x03\x32\x35\x36\x12\x19\n\rheight_stride\x18\x03 \x01(\x05:\x02\x31\x36\x12\x18\n\x0cwidth_stride\x18\x04 \x01(\x05:\x02\x31\x36\x12\x18\n\rheight_offset\x18\x05 \x01(\x05:\x01\x30\x12\x17\n\x0cwidth_offset\x18\x06 \x01(\x05:\x01\x30\x12\x0e\n\x06scales\x18\x07 \x03(\x02\x12\x15\n\raspect_ratios\x18\x08 \x03(\x02')
TypeError: new() got an unexpected keyword argument 'serialized_options'

pip install -U protobuf

@jainsanmati

This comment has been minimized.

Copy link

@jainsanmati jainsanmati commented May 5, 2019

pip install -U protobuf worked for me too. Thanks @keevee09 .

@danintel

This comment has been minimized.

Copy link

@danintel danintel commented May 16, 2019

You can either:

  1. upgrade to Protobuf 3.6.0 or
  2. hand delete the "serialized_options=None," argument from the generated *_pb2.py files.
@Usmaniatech

This comment has been minimized.

Copy link

@Usmaniatech Usmaniatech commented Jun 20, 2019

Unityagents support protobuf==3.5.2 and unity mlagents supports protobuf>=3.6,<3.7
I require both unityagents and mlagents. How do I fix this

@siddhartha-mukherjee-india

This comment has been minimized.

Copy link

@siddhartha-mukherjee-india siddhartha-mukherjee-india commented Jun 23, 2019

pip install -U protobuf

worked for me. It updated protobuf to v3.6

This worked for me too .. thank you for your help

@Usmaniatech

This comment has been minimized.

Copy link

@Usmaniatech Usmaniatech commented Jun 24, 2019

Which version of ml-agents are you using ? @siddhartha-mukherjee-india

@harshaljaiswal

This comment has been minimized.

Copy link

@harshaljaiswal harshaljaiswal commented Jun 27, 2019

pip install -U protobuf
Worked for me too.

@Usmaniatech

This comment has been minimized.

Copy link

@Usmaniatech Usmaniatech commented Jun 27, 2019

pip install -U protobuf
Worked for me too.

Yes it works. But I was trying to work with greater version than 0.4.0 of MLAgents. It don't work their.

@TaDucToan

This comment has been minimized.

Copy link

@TaDucToan TaDucToan commented Oct 7, 2019

pip install -U protobuf
It's work. thank you for your help

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

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.