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

make traceback more informative #27

Closed bernt-matthias closed 5 years ago

bernt-matthias commented 5 years ago

Its difficult to understand whats going wrong here:

Traceback (most recent call last):
  File "/gpfs1/data/galaxy_server/galaxy/.venv/bin/parsec", line 11, in <module>
    sys.exit(parsec())
  File "/gpfs1/data/galaxy_server/galaxy/.venv/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/gpfs1/data/galaxy_server/galaxy/.venv/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/gpfs1/data/galaxy_server/galaxy/.venv/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/gpfs1/data/galaxy_server/galaxy/.venv/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/gpfs1/data/galaxy_server/galaxy/.venv/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/gpfs1/data/galaxy_server/galaxy/.venv/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/gpfs1/data/galaxy_server/galaxy/.venv/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/gpfs1/data/galaxy_server/galaxy/.venv/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/gpfs1/data/galaxy_server/galaxy/.venv/lib/python2.7/site-packages/parsec/decorators.py", line 18, in custom_exception
    except json.decoder.JSONDecodeError:
AttributeError: 'module' object has no attribute 'JSONDecodeError'
hexylena commented 5 years ago

Galaxy returned an error to your API call, parsec attempted to parse it as json but this threw an error, in the processing of that error we attempted to catch what is specifically a json decoding error but the module must have been renamed internally, and we did not attempt to automatically recover from this.

This looks potentially like a difference between py2/py3, are you perhaps running this under py2? It should work under py3. Apparently we claim to support py2 but I have long since stopped testing under py2.

hexylena commented 5 years ago

I've pushed a change that will address this in a future release of parsec. https://github.com/galaxy-iuc/parsec/pull/26/commits/9bbb8f6cd76a547e2a1e18ee19fb659ce75c1ec2

bernt-matthias commented 5 years ago

Thanks for the info. I will switch to py3