Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Upload history API #263

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hexylena
Copy link
Member

import_history_from_url works perfectly, from_path is currently failing with some awful galaxy error

 2 bytes in 89 msecs (HTTP/1.1 200) 2 headers in 95 bytes (1 switches on core 1)
Error - <type 'exceptions.UnicodeDecodeError'>: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte
URL: https://usegalaxy.eu/api/histories
File 'lib/galaxy/web/framework/middleware/error.py', line 239 in __next__
  return next(self.app_iterator)
File 'lib/galaxy/web/framework/middleware/sentry.py', line 40 in __call__
  iterable = self.application(environ, start_response)
File '/usr/local/galaxy/galaxy-dist/.venv/lib/python2.7/site-packages/paste/recursive.py', line 85 in __call__
  return self.application(environ, start_response)
File 'lib/galaxy/web/framework/middleware/statsd.py', line 35 in __call__
  req = self.application(environ, start_response)
File '/usr/local/galaxy/galaxy-dist/.venv/lib/python2.7/site-packages/paste/httpexceptions.py', line 640 in __call__
  return self.application(environ, start_response)
File 'lib/galaxy/web/framework/base.py', line 136 in __call__
  return self.handle_request(environ, start_response)
File 'lib/galaxy/web/framework/base.py', line 192 in handle_request
  trans = self.transaction_factory(environ)
File 'lib/galaxy/web/framework/webapp.py', line 80 in <lambda>
  self.set_transaction_factory(lambda e: self.transaction_chooser(e, galaxy_app, session_cookie))
File 'lib/galaxy/web/framework/webapp.py', line 109 in transaction_chooser
  return GalaxyWebTransaction(environ, galaxy_app, self, session_cookie)
File 'lib/galaxy/web/framework/webapp.py', line 208 in __init__
  self.error_message = self._authenticate_api(session_cookie)
File 'lib/galaxy/web/framework/webapp.py', line 367 in _authenticate_api
  api_key = self.request.params.get('key', None) or self.request.headers.get('x-api-key', None)
File '/usr/local/galaxy/galaxy-dist/.venv/lib/python2.7/site-packages/webob/request.py', line 853 in params
  params = NestedMultiDict(self.GET, self.POST)
File '/usr/local/galaxy/galaxy-dist/.venv/lib/python2.7/site-packages/webob/request.py', line 809 in POST
  vars = MultiDict.from_fieldstorage(fs)
File '/usr/local/galaxy/galaxy-dist/.venv/lib/python2.7/site-packages/webob/multidict.py', line 92 in from_fieldstorage
  obj.add(field.name, decode(value))
File '/usr/local/galaxy/galaxy-dist/.venv/lib/python2.7/site-packages/webob/multidict.py', line 78 in <lambda>
  decode = lambda b: b.decode(charset)
File '/usr/local/galaxy/galaxy-dist/.venv/lib/python2.7/encodings/utf_8.py', line 16 in decode
  return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte

@nsoranzo
Copy link
Member

Can you add a test for import_history_from_path() ?

@hexylena
Copy link
Member Author

Ok, done. Unfortunately (because of how terrible history import/export is), this will mutate remote state in a way we cannot clean up.

Base automatically changed from master to main January 16, 2021 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants