NaomiProject / Naomi

The Naomi Project is an open source, technology agnostic platform for developing always-on, voice-controlled applications!
https://projectnaomi.com/
MIT License
242 stars 47 forks source link

Better error checking for NPE #390

Open aaronchantrill opened 9 months ago

aaronchantrill commented 9 months ago

Description

If anything fails while installing requirements from python_requirements.txt while installing a plugin, the NPE install succeeds but the plugin will be missing dependencies. We need to check the return code from npe.py line 276 where it runs the pip3 install command.

Expected Behavior

The installer should either quit with an error message letting the user know that the install failed or keep trying until the install succeeds.

Actual Behavior

The install continues. Eventually the error messages from pip scroll off the top of the screen. The last message says that the plugin has been installed. It is surprising when the plugin is not available the next time the user runs Naomi.

Possible Fix

if(run_command(cmd).returncode != 0):
    self._logger.error(f"Error installing {row['Name']}")
    exit()

Steps to Reproduce

  1. install Mimic3tts plugin from npe with a funky internet connection.