Closed jacktheripper-17 closed 3 years ago
Hello @jacktheripper-17 , did you figure out a way to solve this problem eventually ?
Hello @jacktheripper-17 , did you figure out a way to solve this problem eventually ?
Yes, I did. Do you want a solution as well?
Yes, if it is not a problem 😄
Check out this thread. I asked people on StackOverflow lol https://stackoverflow.com/questions/66282869/parser-takes-only-first-character-from-the-filename-and-says-file-not-found
I know it's very difficult to understand my issue, but I'll try my best to explain. So I've cloned a repository from Github and working on it. When I run the program without any arguments, it works fine
python main.py --audio_input_prediction
works fine. But when I try to pass my own file, it shows an error.python main.py --audio_input_prediction myaudio.wav
shows an error saying "FileNotFoundError: [Errno 2] No such file or directory: '<File Path/m'" Notice how it only takes the first character from my argument? In the code, for default mode, it's something like: (args.py)parser.add_argument('--audio_input_prediction', default=['default_audio.wav'], type=list)
and it works fine. So naturally, I tried to add '[]' to my file namepython main.py --audio_input_prediction [myaudio.wav]
Shows an error too which says "FileNotFoundError: [Errno 2] No such file or directory: '<File Path/['" See, here it took only the first character of my provided argument i.e. '[' And the file IS there. No spelling mistakes in file name either. Any help would be very much appreciated.In my conclusion, the issue is in args.py, specifically in this line `parser.add_argument('--audio_input_prediction', default=['noisy_voice_long_t2.wav'], type=list)'. I even tried to change the type to 'str', but still, I got the same error