AttributeError: module 'tensorflow.python.platform.flags' has no attribute '_FlagValues'
====================================================================== ERROR: test_train_infer (seq2seq.test.pipeline_test.PipelineTest) Tests training and inference scripts.
Traceback (most recent call last): File "C:\Users\xxxxx\NLP\seq2seqten\seq2seq\seq2seq\test\pipeline_test.py", line 76, in test_train_infer _clear_flags() File "C:\Users\xxxxxx\NLP\seq2seqten\seq2seq\seq2seq\test\pipeline_test.py", line 44, in _clear_flags tf.app.flags.FLAGS = tf.app.flags._FlagValues() AttributeError: module 'tensorflow.python.platform.flags' has no attribute '_FlagValues'
Ran 2 tests in 0.733s
FAILED (errors=1, skipped=1)
Can you please help me how I can get solve this error.
Traceback (most recent call last): File "DeepSpeech.py", line 11, in import absl.app File "/home/sehar/venv/lib/python3.6/site-packages/absl/app.py", line 40, in from absl import flags File "/home/sehar/venv/lib/python3.6/site-packages/absl/flags/init.py", line 41, in from absl.flags import _defines File "/home/sehar/venv/lib/python3.6/site-packages/absl/flags/_defines.py", line 31, in from absl.flags import _flagvalues File "/home/sehar/venv/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 27, in import logging File "/home/sehar/DeepSpeech/logging.py", line 6, in from util.flags import FLAGS File "/home/sehar/DeepSpeech/util/flags.py", line 6, in FLAGS = absl.flags.FLAGS AttributeError: module 'absl' has no attribute 'flags' kindly help me to slove this error
I run into the same error,did you solve the problem?:D
Any luck ??
change the _clear_flags function in seq2seq\seq2seq\test\pipeline_test.py to
def _clear_flags():
"""Resets Tensorflow's FLAG values"""
#pylint: disable=W0212
for flag_key in dir(tf.app.flags.FLAGS):
delattr(tf.app.flags.FLAGS, flag_key)
#tf.app.flags.FLAGS = tf.app.flags._FlagValues()
tf.app.flags._global_parser = argparse.ArgumentParser()
this has worked for me