Jarvis icon indicating copy to clipboard operation
Jarvis copied to clipboard

Errors from pydub

Open aprzn123 opened this issue 5 years ago • 2 comments

On Windows, whenever I run Jarvis, this warning message is sent before it starts:

  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Q:\...\Jarvis\env\lib\site-packages\pydub\utils.py:184: RuntimeWarning: Couldn't find ffplay or avplay - defaulting to ffplay, but may not work
  warn("Couldn't find ffplay or avplay - defaulting to ffplay, but may not work", RuntimeWarning)

After this, if I use enable sound followed by gtts, I get further errors crashing the program.

Q:\...\Jarvis\env\lib\site-packages\pydub\utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
  warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
Traceback (most recent call last):
  File "Q:\...\py37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "Q:\...\py37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)

...

    res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
  File "Q:\...\py37\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "Q:\...\py37\lib\subprocess.py", line 1207, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

Once this happens, the error crashes the program immediately upon startup.

Is this a known issue?

aprzn123 avatar Jun 22 '20 19:06 aprzn123

Thanks for reporting this issue!

  1. Rename jarviscli/packages/memory/memory.json to reset Jarvis memory - so Jarvis start for now
  2. Think, we should definitely try-except any exception that is thrown by tts initialization to avoid program crashes on startup (yes, that is really ugly) in the future
  3. So, to fix this issue; my guess: Installing simpleaudio (env\Scripts\pip.exe install simpleaudio) could already fix this issue. I'll make some tests soon

pnhofmann avatar Jun 25 '20 10:06 pnhofmann

This still hasn't been fixed. Is there anything we can do in the code about it?

FatalTrip avatar Jul 30 '21 10:07 FatalTrip