Skip to content

Commit

Permalink
More helpful Error message
Browse files Browse the repository at this point in the history
  • Loading branch information
niklassiemer authored Dec 16, 2024
1 parent fc1abf4 commit 04cfcf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pysqa/queueadapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ 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

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

0 comments on commit 04cfcf6

Please sign in to comment.