hiromu / robust_audio_ae

Robust Audio Adversarial Example for a Physical Attack
BSD 2-Clause "Simplified" License
60 stars 20 forks source link

error when run make_checkpoint.py #1

Closed Vai-bhav closed 4 years ago

Vai-bhav commented 4 years ago

Traceback (most recent call last): File "/home/robust_audio_ae/env/lib/python3.6/site-packages/absl/flags/_flag.py", line 180, in _parse return self.parser.parse(argument) File "/home/robust_audio_ae/env/lib/python3.6/site-packages/absl/flags/_argument_parser.py", line 114, in parse type(argument))) TypeError: flag value must be a string, found "<class 'int'>"

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "make_checkpoint.py", line 28, in import DeepSpeech File "DeepSpeech/DeepSpeech.py", line 50, in tf.app.flags.DEFINE_string('coord_retries', 100, 'number of tries of workers connecting to training coordinator before failing') File "/home/robust_audio_ae/env/lib/python3.6/site-packages/tensorflow/python/platform/flags.py", line 58, in wrapper return original_function(*args, kwargs) File "/home/robust_audio_ae/env/lib/python3.6/site-packages/absl/flags/_defines.py", line 241, in DEFINE_string DEFINE(parser, name, default, help, flag_values, serializer, args) File "/home/robust_audio_ae/env/lib/python3.6/site-packages/absl/flags/_defines.py", line 81, in DEFINE DEFINE_flag(_flag.Flag(parser, serializer, name, default, help, **args), File "/home/robust_audio_ae/env/lib/python3.6/site-packages/absl/flags/_flag.py", line 109, in init self._set_default(default) File "/home/robust_audio_ae/env/lib/python3.6/site-packages/absl/flags/_flag.py", line 215, in _set_default self.default = self._parse(value) File "/home/robust_audio_ae/env/lib/python3.6/site-packages/absl/flags/_flag.py", line 183, in _parse 'flag --%s=%s: %s' % (self.name, argument, e)) absl.flags._exceptions.IllegalFlagValueError: flag --coord_retries=100: flag value must be a string, found "<class 'int'>"

tom-doerr commented 4 years ago

I had the same issue (https://github.com/carlini/audio_adversarial_examples/issues/24) and solved it by changing the value of "--coord_retries=" from 100 to '100' (string instead of int) in DeepSpeech/DeepSpeech.py.

Vai-bhav commented 4 years ago

Working Thank u @tom-doerr

1awrenceYang commented 5 months ago

You solution works! Thank you so much @tom-doerr

tom-doerr commented 5 months ago

@hiromu Maybe the issue should be reopened since it's not actually fixed