Skip to content

Better error checking for NPE #390

@aaronchantrill

Description

@aaronchantrill

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions