Skip to content

Error message when unable to find model files #72

@jamorrison

Description

@jamorrison

When one of the model files is missing during annotation (whether in annotate-reads or visualize), a FileNotFoundError exception is thrown and a backtrace printed. There are two issues here, but they have the same solution, I think.

  1. The exception should be caught and handled gracefully if 1+ model files are missing.
  2. When the backtrace is printed to a file, the top of the backtrace makes it seem like the error is something other than a missing file. You have to scroll down to find the actual root cause.

The solution to this, I believe, would be to check for the needed model files prior to trying to load them, then erroring out if they can't be found with a helpful error message (Unable to find: <file name> or something like that). This would avoid the confusing backtrace as well as handling the missing files gracefully.

I also noticed this is occurring after the GPU has been queried to test if GPUs are available and how many. When they aren't this can take a long time, so I think it would be beneficial to check for model files prior to querying the GPU. That way it can error out quickly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions