Conditional-GAN icon indicating copy to clipboard operation
Conditional-GAN copied to clipboard

AttributeError: _parse_flags

Open ayushman-shopin opened this issue 6 years ago • 4 comments

Error (My tensorflow version is 1.5)

File "main.py", line 35, in FLAGS._parse_flags() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/flags.py", line 85, in getattr return wrapped.getattr(name) File "/usr/local/lib/python3.5/dist-packages/absl/flags/_flagvalues.py", line 470, in getattr raise AttributeError(name) AttributeError: _parse_flags

ayushman-shopin avatar Mar 25 '18 17:03 ayushman-shopin

Hi,

I think the problem is the Tensroflow version. They might change the _parse_flags() API in the 1.5 version. To solve this issue, just use the 1.0 version, or you need to follow the new version API to revise several codes.

-Han

ayushman-shopin [email protected] 於 2018年3月26日 上午1:11 寫道:

Error (My tensorflow version is 1.5)

File "main.py", line 35, in FLAGS._parse_flags() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/flags.py", line 85, in getattr return wrapped.getattr(name) File "/usr/local/lib/python3.5/dist-packages/absl/flags/_flagvalues.py", line 470, in getattr raise AttributeError(name) AttributeError: _parse_flags

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/m516825/Conditional-GAN/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/ALkFYFEC5dTCz0bncx8w8JGsGwmdVM-cks5th8_LgaJpZM4S6OB2.

m516825 avatar Mar 25 '18 17:03 m516825

I have adjusted the code to work in newer TF versions.

FranzHahn avatar Jul 17 '18 11:07 FranzHahn

ReplaceFLAGS._parse_flags() with FLAGS(sys.argv) works well on 1.9 for me.

zhsuiy avatar Aug 02 '18 06:08 zhsuiy

I have adjusted the code to work in newer TF versions.

Hi, I think the problem is the Tensroflow version. They might change the _parse_flags() API in the 1.5 version. To solve this issue, just use the 1.0 version, or you need to follow the new version API to revise several codes. -Han ayushman-shopin @.***> 於 2018年3月26日 上午1:11 寫道: Error (My tensorflow version is 1.5) File "main.py", line 35, in FLAGS._parse_flags() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/flags.py", line 85, in getattr return wrapped.getattr(name) File "/usr/local/lib/python3.5/dist-packages/absl/flags/_flagvalues.py", line 470, in getattr raise AttributeError(name) AttributeError: _parse_flags — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#2>, or mute the thread https://github.com/notifications/unsubscribe-auth/ALkFYFEC5dTCz0bncx8w8JGsGwmdVM-cks5th8_LgaJpZM4S6OB2.

I have downgraded my python version and tensorflow to be 1.0 version, but there is still error:

Traceback (most recent call last): File "main.py", line 80, in tf.app.run() File "C:\Users\ASUS\Anaconda3\envs\tesis\lib\site-packages\tensorflow\python\platform\app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 46, in main for k, v in sorted(FLAGS._flags.items()): File "C:\Users\ASUS\Anaconda3\envs\tesis\lib\site-packages\tensorflow\python\platform\flags.py", line 50, in getattr raise AttributeError(name) AttributeError: _flags

do you have any idea how to solve it?

AMardiah avatar Apr 15 '19 18:04 AMardiah