I have also added the addition of a trailing slash to ephemeris. Thanks for reporting this.


On Aug 31, 2016 7:43 PM, "Nicola Soranzo" <nsoranzo@tiscali.it> wrote:
Hi Ido,
your analysis is correct, this is what the BioBlend documentation prescribes:

https://bioblend.readthedocs.io/en/latest/api_docs/galaxy/all.html#bioblend.galaxy.GalaxyInstance

Cheers,
Nicola

---- Tamir,Ido ha scritto ----

>It only works when specifying the url like this (http + trailing slash) otherwise urljoin removes the subdir:
>'http://server/subdir/'
>
>and I use ephemeris
>
>thank you very much,
>ido
>
>> On 30 Aug 2016, at 17:55, Marius van den Beek <m.vandenbeek@gmail.com> wrote:
>>
>> Hi Ido,
>>
>> please use ephemeris, it’s as easy as it gets:
>> pip install ephemeris
>> shed-install -g <galaxy_url> -a <admin_key> -t <tool_list_file>.
>> The install_tool_shed_tools.py is deprecated and will not work anymore.
>> That said, we haven’t tested installing from toolshed on subdirectories, it’s entirely possible that there is a problem.
>> I will have a look and let you know.
>>
>> Best,
>> Marius
>>
>>
>> On 30 August 2016 at 17:14, Tamir,Ido <Ido.Tamir@vbcf.ac.at> wrote:
>> Hi,
>>
>> a)
>> short version:
>> instead of:
>> http://gecko.imp.univie.ac.at/galtools/api/repositories/get_ordered_installable_revisions?owner=itme&name=shrnaseqw
>>
>> the tool makes a request to:
>> http://gecko.imp.univie.ac.at/api/repositories/get_ordered_installable_revisions?owner=itme&name=shrnaseqw
>>
>> (i.e. galtools is missing)
>>
>>
>>
>>
>> b)
>> long version:
>>
>> my toolshed is running behind a proxy under:
>> my.server/galtools
>>
>> I use the script install_tool_shed_tools.py via galaxy-ansible-playbook (I know of ephemeris but don’t know how to use it yet).
>>
>> Installing tools from the default toolshed works, but when I try to access my own tools I see in nxginx logs
>> that the request from the script swallowed the “galtools” part.
>>
>> But the url is stored correctly in json, and I can get the appropriate response when I specify the url in a browser:
>>
>> http://gecko.imp.univie.ac.at/galtools/api/repositories/get_ordered_installable_revisions?owner=itme&name=shrnaseqw
>>
>> =>
>>
>> ["f663fded0c69", "4aeaa49154f8"]
>>
>>
>> thank you very much for your input,
>> ido
>>
>>
>> ansible log:
>> ok: [localhost] => (item={u'owner': u'itme', u'tool_shed_url': u'gecko.imp.univie.ac.at/galtools', u'tool_panel_section_id': u'ngs_rna', u'name': u'shrnaseqw'}) => {"changed": false, "cmd": ["/groups/vbcf-ngs/wfsys/galaxy/galaxy/.venv/bin/python", "install_tool_shed_tools.py", "-y", "name: shrnaseqw\nowner: itme\ntool_panel_section_id: ngs_rna\ntool_shed_url: gecko.imp.univie.ac.at/galtools\n", "-a", "7e7c8ec27a0a99acee883d2beea8a60b", "-g", "http://127.0.0.1:9098/"], "delta": "0:00:00.820941", "end": "2016-08-30 16:55:58.869977", "failed": false, "failed_when_result": false, "invocation": {"module_args": {"_raw_params": "/groups/vbcf-ngs/wfsys/galaxy/galaxy/.venv/bin/python install_tool_shed_tools.py -y \"name: shrnaseqw\nowner: itme\ntool_panel_section_id: ngs_rna\ntool_shed_url: gecko.imp.univie.ac.at/galtools\n\" -a 7e7c8ec27a0a99acee883d2beea8a60b -g http://127.0.0.1:9098/", "_uses_shell": false, "chdir": "/groups/vbcf-ngs/wfsys/galaxy/galaxy", "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "item": {"name": "shrnaseqw", "owner": "itme", "tool_panel_section_id": "ngs_rna", "tool_shed_url": "gecko.imp.univie.ac.at/galtools"}, "rc": 1, "start": "2016-08-30 16:55:58.049036", "stderr": "Traceback (most recent call last):\n  File \"install_tool_shed_tools.py\", line 652, in <module>\n    install_tools(options)\n  File \"install_tool_shed_tools.py\", line 590, in install_tools\n    (tool['name'], tool['owner'])[-1])\n  File \"/groups/vbcf-ngs/wfsys/galaxy/galaxy/.venv/lib/python2.7/site-packages/bioblend/toolshed/repositories/__init__.py\", line 147, in get_ordered_installable_revisions\n    r = Client._get(self, url=url, params=params)\n  File \"/groups/vbcf-ngs/wfsys/galaxy/galaxy/.venv/lib/python2.7/site-packages/bioblend/galaxy/client.py\", line 147, in _get\n    raise ConnectionError(msg)\nbioblend.galaxy.client.ConnectionError: GET: error 404: '<html>\\r\\n<head><title>404 Not Found</title></head>\\r\\n<body bgcolor=\"white\">\\r\\n<center><h1>404 Not Found</h1></center>\\r\\n<hr><center>nginx/1.2.1</center>\\r\\n</body>\\r\\n</html>\\r\\n', 0 attempts left: None", "stdout": "", "stdout_lines": [], "warnings": []}
>>
>> nginx:
>> ==> error.log <==
>> 2016/08/30 16:47:54 [error] 833#0: *442173 open() "/etc/nginx/html/api/repositories/get_ordered_installable_revisions" failed (2: No such file or directory), client: 10.42.160.35, server: gecko, request: "GET /api/repositories/get_ordered_installable_revisions?owner=itme&name=shrnaseqw HTTP/1.1", host: "gecko.imp.univie.ac.at"
>>
>> ==> access.log <==
>> 10.42.160.35 - - [30/Aug/2016:16:47:54 +0200] "GET /api/repositories/get_ordered_installable_revisions?owner=itme&name=shrnaseqw HTTP/1.1" 404 142 "-" "python-requests/2.8.1”
>>
>> … this is how it should be:
>>
>> 10.42.160.51 - - [30/Aug/2016:16:52:54 +0200] "GET /galtools/api/repositories/get_ordered_installable_revisions?owner=itme&name=shrnaseqw HTTP/1.1" 200 43 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 Firefox/48.0"
>>
>>
>> ___________________________________________________________
>> Please keep all replies on the list by using "reply all"
>> in your mail client.  To manage your subscriptions to this
>> and other Galaxy lists, please use the interface at:
>>   https://lists.galaxyproject.org/
>>
>> To search Galaxy mailing lists use the unified search at:
>>   http://galaxyproject.org/search/mailinglists/
>>
>
>___________________________________________________________
>Please keep all replies on the list by using "reply all"
>in your mail client.  To manage your subscriptions to this
>and other Galaxy lists, please use the interface at:
https://lists.galaxyproject.org/
>
>To search Galaxy mailing lists use the unified search at:
http://galaxyproject.org/search/mailinglists/