Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More helpful Error message #372

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pysqa/queueadapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,12 @@ def set_queue_adapter(
# The RemoteQueueAdapter has additional dependencies, namely paramiko and tqdm.
# By moving the import to this line it only fails when the user specifies the
# RemoteQueueAdapter in their pysqa configuration.
from pysqa.base.remote import RemoteQueueAdapter
try:
from pysqa.base.remote import RemoteQueueAdapter
except ImportError as e:
raise ImportError(
"Failed to instantiate RemoteQueue setup, probably due to missing optional dependencies"
) from e
Comment on lines +410 to +415
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit reluctant to add this try except statement, as the message does not add a lot more details.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was only confused, since I installed pure pyiron_base to test some things and got greeted by an ImportError. I immediately checked if our feedstock is missing packages and then realized it is an optional dependency.
This is only conveyed by the code base.
However, I am fine with not having this in.


return RemoteQueueAdapter(
config=config, directory=directory, execute_command=execute_command
Expand Down
Loading