-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
Description
e.g.
$ planemo shed_create --shed_target insert_typo_here ~/repositories/pico_galaxy/packages/package_mira_4_0_2/ ; echo "$? returned"
Could not update package_mira_4_0_2
('Connection aborted.', gaierror(-2, 'Name or service not known')), 0 attempts left: None
('Connection aborted.', gaierror(-2, 'Name or service not known')), 0 attempts left: None
255 returned
It took me a long to to realise the problem here was a typo in the Tool Shed alias (I'd originally typed testoolshed instead of testtoolshed).
As an aside, the message "Could not update ..." appears to be from checking if the repository already exists (at the time or writing, it does not). This might be clearer depending where else the message appears:
$ git diff planemo/shed/__init__.py
diff --git a/planemo/shed/__init__.py b/planemo/shed/__init__.py
index 8cf62d2..b3acdd5 100644
--- a/planemo/shed/__init__.py
+++ b/planemo/shed/__init__.py
@@ -1047,7 +1047,7 @@ class RealizedRepositry(object):
return repo_id
except Exception as e:
message = api_exception_to_message(e)
- error("Could not update %s" % self.name)
+ error("Could not find %s" % self.name)
error(message)
return None
This same usability issue affects other commands too, e.g.
$ planemo shed_upload --shed_target insert_typo_here ~/repositories/pico_galaxy/packages/package_mira_4_0_2/ ; echo "$? returned"
cd '/mnt/galaxy/repositories/pico_galaxy/packages/package_mira_4_0_2' && git rev-parse HEAD
cd '/mnt/galaxy/repositories/pico_galaxy/packages/package_mira_4_0_2' && git diff --quiet
Could not find package_mira_4_0_2
('Connection aborted.', gaierror(-2, 'Name or service not known')), 0 attempts left: None
Repository [package_mira_4_0_2] does not exist in the targeted Tool Shed.
255 returned
I suggest planemo should catch this error and turn it into a more user-friendly error message, and/or do some pre-validation of the --shed_target argument?
Reactions are currently unavailable