galaxy-iuc / parsec

Access Galaxy at the speed of light with automatically generated BioBlend wrappers
Apache License 2.0
9 stars 9 forks source link

upload_file_from_server fails linking files into library #20

Open cgirardot opened 7 years ago

cgirardot commented 7 years ago

Hi,

I am trying to use parsec to link a file present in my user data folder with a command like

parsec libraries upload_file_from_server --folder_id Fb8899c451cc037c7 --link_data_only link_to_files c9da9ba18dff53dc /path/to/user-data-lib/girardot@embl.de/parsec-test/

which fails with:

Traceback (most recent call last):
  File "/usr/local/bin/parsec", line 11, in <module>
    load_entry_point('galaxy-parsec==1.0.4', 'console_scripts', 'parsec')()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/parsec/decorators.py", line 18, in custom_exception
    except json.decoder.JSONDecodeError:
AttributeError: 'module' object has no attribute 'JSONDecodeError'

I am on Mac but I have the same error if I try on a unix server. I locally have python 2.7 as visible above. Do you have an idea of what goes wrong ?

Thanks

Charles

cgirardot commented 7 years ago

After editing the decorators.py file (commenting the try...except json.decoder.JSONDecodeError block to only leave error(str(e))), I now have the real error :

Unexpected HTTP status code: 403: "\"library_import_dir\" is not defined in the Galaxy configuration file"

I'll check with my colleague who maintains then galaxy server but I am not sure why this library_import_dir is needed.

Any comment welcome :-) Charles