Skip to content

Multiple file download results in 500 #154

@kofalt

Description

@kofalt

POST to /api/download with request body:

{"optional":true,"nodes":[
{"level":"session","_id":"56b3585d72ff76421fbca735"},
{"level":"session","_id":"56b3585e72ff76421fbca739"},
{"level":"session","_id":"56b3586572ff76421fbca743"}]}

Results in:

2016-02-05 21:01:43             root               webapp2.py  1552:ERRO 'NoneType' object has no attribute '__getitem__'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "./api/api.py", line 121, in dispatcher
    rv = router.default_dispatcher(request, response)
  File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "./api/base.py", line 128, in dispatch
    return super(RequestHandler, self).dispatch()
  File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "./api/core.py", line 466, in download
    return self._preflight_archivestream(req_spec)
  File "./api/core.py", line 287, in _preflight_archivestream
    prefix = project['group'] + '/' + project['label'] + '/' + self._path_from_container(session, used_subpaths, project['_id'])
TypeError: 'NoneType' object has no attribute '__getitem__'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions