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

AttributeError: 'int' object attribute '__doc__' is read-only #12491

Closed
DavidNorman opened this issue Aug 22, 2017 · 12 comments
Closed

AttributeError: 'int' object attribute '__doc__' is read-only #12491

DavidNorman opened this issue Aug 22, 2017 · 12 comments

Comments

@DavidNorman
Copy link
Contributor

@DavidNorman DavidNorman commented Aug 22, 2017

In the file tensorflow/compiler/tests/adagrad_test_poplar.runfiles/org_tensorflow/tensorflow/python/ops/variable_scope.py", line 191, I have an error when trying to run unit tests.

Python is unhappy with trying to assign to doc.

This is on OS/X, with a virtualenv containing all of the modules required for the head of master on 22nd August 2017.

I have had to add autograd and enum, and as a consequence of the OS/X built-in numpy, I have switched to building tensorflow in a virtualenv.

@yongtang

This comment has been minimized.

Copy link
Member

@yongtang yongtang commented Aug 22, 2017

I encountered a similar issue in Ubuntu 16.04 with python 2.7. Addressed the issue by installing python-enum34 package which has the enum34 backport.

@andydavis1

This comment has been minimized.

Copy link
Member

@andydavis1 andydavis1 commented Aug 22, 2017

Please re-open if the above-mentioned work around does not solve your issue...

@andydavis1 andydavis1 closed this Aug 22, 2017
@MrShaham

This comment has been minimized.

Copy link

@MrShaham MrShaham commented Sep 2, 2017

Hi
i face the same problem on Ubuntu 16.10 when i try

:~/tensorflow$ bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir ~/flower_photos
after enter above line in terminal, the out put is

Traceback (most recent call last): File "/home/sam/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/examples/image_retraining/retrain.py", line 108, in <module> import tensorflow as tf File "/home/sam/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/__init__.py", line 24, in <module> from tensorflow.python import * File "/home/sam/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 63, in <module> from tensorflow.python.framework.framework_lib import * File "/home/sam/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/framework_lib.py", line 102, in <module> from tensorflow.python.framework.importer import import_graph_def File "/home/sam/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/importer.py", line 30, in <module> from tensorflow.python.framework import function File "/home/sam/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/function.py", line 34, in <module> from tensorflow.python.ops import variable_scope as vs File "/home/sam/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/ops/variable_scope.py", line 192, in <module> """ AttributeError: 'int' object attribute '__doc__' is read-only

`
I already install autograd and enum and python-enum34 but problem still there.

@jzharris

This comment has been minimized.

Copy link

@jzharris jzharris commented Sep 4, 2017

I had the same result as you after installing python-enum34 in Ubuntu 16.04 with python 2.7. I had to run pip uninstall enum to get back on track:

@leonmak

This comment has been minimized.

Copy link

@leonmak leonmak commented Nov 14, 2017

@MrShaham fyi pip install enum34 for mac solves it for me

@saurabhhjjain

This comment has been minimized.

Copy link

@saurabhhjjain saurabhhjjain commented Nov 16, 2017

I had same issue on mac, @leonmak suggestion worked for me.

@MrShaham

This comment has been minimized.

Copy link

@MrShaham MrShaham commented Dec 29, 2017

@leonmak sorry for late reply. I've been busy with my studies. This method not for me either . i take different rote for achieving my goal. i upload my work as soon as possible.

@wenguanwang

This comment has been minimized.

Copy link

@wenguanwang wenguanwang commented Feb 9, 2018

Uninstall enum and intall enum34.

@bringtree

This comment has been minimized.

Copy link
Contributor

@bringtree bringtree commented Jul 22, 2018

@wenguanwang when i uninstall enum. it throws the error about. I had been installed enum34.

ImportError: No module named enum
@changwuxie

This comment has been minimized.

Copy link

@changwuxie changwuxie commented Sep 19, 2018

i had same issue on centos7,@leonmak suggestion worked for me.

@AllenYLJiang

This comment has been minimized.

Copy link

@AllenYLJiang AllenYLJiang commented Jan 29, 2019

conda install enum34

@bruce1408

This comment has been minimized.

Copy link

@bruce1408 bruce1408 commented Jul 17, 2019

Uninstall enum and intall enum34.

this is the right answer,thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.