molssi-seamm/seamm

Error if file does not exist

Closed this issue · 0 comments

  • MolSSI Workflow version: 1.0
  • Python version: 3.9
  • Operating System: Linux

Description

If I attempt to open a flowchart that does not exist, I get a seemingly infinite FileNotFound error.

What I Did

I typed a file path into the flowchart open GUI instead of selecting it from the GUI window. I typed the file name incorrectly, which caused a FileNotFound error. After this occurs, there seems to be no way of recovering the current GUI, and it must be exited and restarted.

Proposed Solution

I think a check that the file path exists should be added around this line (

if path is not None:
). If the file path does not exist, a GUI pop-up can be displayed which says the file is not found. I was able to bypass this error by adding this check to this portion of the code, and skipping opening if the file did not exist. This is not informative to the user, so we can add something similar, but have a window pop up to tell the user of the error.

I'd like to try adding this, if you can provide some guidance on how to do that. @paulsaxe