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

HTTP 500 in analysis API due to AttributeError in get_object_list() #3199

Closed
hackdna opened this issue Feb 6, 2019 · 0 comments
Closed

HTTP 500 in analysis API due to AttributeError in get_object_list() #3199

hackdna opened this issue Feb 6, 2019 · 0 comments

Comments

@hackdna
Copy link
Member

hackdna commented Feb 6, 2019

  • Specific code commit: v1.6.7
  • Version of the web browser and OS: N/A
  • Environment where the error occurred: AWS

Steps to reproduce

Unknown, error report received by email:

Internal Server Error: /api/v1/analysis/
Traceback (most recent call last):
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 202, in wrapper
    response = callback(request, *args, **kwargs)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 433, in dispatch_list
    return self.dispatch('list', request, **kwargs)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 465, in dispatch
    response = method(request, **kwargs)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 1287, in get_list
    objects = self.obj_get_list(bundle=base_bundle, **self.remove_api_resource_names(kwargs))
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 2071, in obj_get_list
    objects = self.apply_filters(bundle.request, applicable_filters)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 2043, in apply_filters
    return self.get_object_list(request).filter(**applicable_filters)
  File "/srv/refinery-platform/refinery/core/api.py", line 992, in get_object_list
    ExtendedGroup.objects.public_group(), perm, DataSet
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/guardian/shortcuts.py", line 701, in get_objects_for_group
    global_perm_set = group.permissions.values_list('codename', flat=True)
AttributeError: 'NoneType' object has no attribute 'permissions'

Request repr():
<WSGIRequest
path:/api/v1/analysis/,
GET:<QueryDict: {u'order_by': [u'-time_start'], u'limit': [u'0'], u'status__in': [u'RUNNING,UNKNOWN'], u'data_set__uuid': [u'ba2ef829-b7a5-48c1-b631-6349b1e9b3df'], u'format': [u'json']}>,
POST:<QueryDict: {}>,
COOKIES:{'_ga': 'GA1.2.1008158846.1448040184',
'_gid': 'GA1.2.674716005.1549456100',
'csrftoken': <redacted>},
META:{'CONTEXT_DOCUMENT_ROOT': '/var/www',
'CONTEXT_PREFIX': '',
u'CSRF_COOKIE': <redacted>,
'DOCUMENT_ROOT': '/var/www',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'application/json, text/plain, */*',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate, br',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': '_ga=GA1.2.1008158846.1448040184; csrftoken=<redacted>; _gid=GA1.2.674716005.1549456100',
'HTTP_HOST': 'hsci.stemcellcommons.org',
'HTTP_REFERER': 'https://hsci.stemcellcommons.org/data_sets/ba2ef829-b7a5-48c1-b631-6349b1e9b3df/',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0',
'HTTP_X_CSRFTOKEN': <redacted>,
'HTTP_X_FORWARDED_FOR': '134.174.140.197',
'HTTP_X_FORWARDED_PORT': '443',
'HTTP_X_FORWARDED_PROTO': 'https',
'PATH_INFO': u'/api/v1/analysis/',
'PATH_TRANSLATED': '/srv/refinery-platform/refinery/config/wsgi_aws.py/api/v1/analysis/',
'QUERY_STRING': 'data_set__uuid=ba2ef829-b7a5-48c1-b631-6349b1e9b3df&format=json&limit=0&order_by=-time_start&status__in=RUNNING,UNKNOWN',
'REMOTE_ADDR': '172.30.0.113',
'REMOTE_PORT': '64188',
'REQUEST_METHOD': 'GET',
'REQUEST_SCHEME': 'http',
'REQUEST_URI': '/api/v1/analysis/?data_set__uuid=ba2ef829-b7a5-48c1-b631-6349b1e9b3df&format=json&limit=0&order_by=-time_start&status__in=RUNNING,UNKNOWN',
'SCRIPT_FILENAME': '/srv/refinery-platform/refinery/config/wsgi_aws.py',
'SCRIPT_NAME': u'',
'SCRIPT_URI': 'http://hsci.stemcellcommons.org/api/v1/analysis/',
'SCRIPT_URL': '/api/v1/analysis/',
'SERVER_ADDR': '172.30.0.60',
'SERVER_ADMIN': '[no address given]',
'SERVER_NAME': 'hsci.stemcellcommons.org',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SIGNATURE': '',
'SERVER_SOFTWARE': 'Apache/2.4.7 (Ubuntu)',
'mod_wsgi.application_group': 'hsci.stemcellcommons.org|',
'mod_wsgi.callable_object': 'application',
'mod_wsgi.enable_sendfile': '0',
'mod_wsgi.handler_script': '',
'mod_wsgi.input_chunked': '0',
'mod_wsgi.listener_host': '',
'mod_wsgi.listener_port': '80',
'mod_wsgi.process_group': 'refinery',
'mod_wsgi.queue_start': '1549456377093605',
'mod_wsgi.request_handler': 'wsgi-script',
'mod_wsgi.script_reloading': '1',
'mod_wsgi.version': (3, 4),
'wsgi.errors': <mod_wsgi.Log object at 0x7f1d999c5a70>,
'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f1d9914e990>,
'wsgi.input': <mod_wsgi.Input object at 0x7f1d99e11670>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}>

Observed behavior

Internal server error

Expected behavior

No internal server error

@hackdna hackdna added this to the Next milestone Feb 6, 2019
@jkmarx jkmarx modified the milestones: Next, Release 1.6.9 Mar 20, 2019
@jkmarx jkmarx self-assigned this Mar 22, 2019
@jkmarx jkmarx closed this as completed Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants