Karplus-Lab-OSU / pgd

The Protein Geometry Database.
Other
4 stars 5 forks source link

Staging site does not run data dumps #53

Closed mathuin closed 8 years ago

mathuin commented 8 years ago

For some reason, the staging site (running the develop branch) does not run a data dump.

This is important to verify that the fix to the secondary-structure bug does not introduce more issues.

If the data dump is not tested, a test needs to be written. If it is, we need to determine why it is passing when it shouldn't -- or why it's not passing.

mathuin commented 8 years ago

I started up an instance of the server in a Docker container and tried to run a data dump.

web_1    | Exception in thread Thread-41:
web_1    | Traceback (most recent call last):
web_1    |   File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
web_1    |     self.run()
web_1    |   File "/opt/pgd/pgd_search/dump/DataDump.py", line 173, in run
web_1    |     parts.append(str(getattr(residue, field)))
web_1    |   File "/opt/pgd/pgd_core/models.py", line 364, in __getattribute__
web_1    |     return object.__getattribute__(self, name)
web_1    | AttributeError: 'Residue' object has no attribute 'L5ss'
web_1    | 
web_1    | [06/May/2016 12:24:27] "GET /search/dump/ HTTP/1.1" 200 9990
web_1    | Traceback (most recent call last):
web_1    |   File "/usr/lib64/python2.7/wsgiref/handlers.py", line 86, in run
web_1    |     self.finish_response()
web_1    |   File "/usr/lib64/python2.7/wsgiref/handlers.py", line 127, in finish_response
web_1    |     for data in self.result:
web_1    |   File "/usr/lib64/python2.7/site-packages/django/utils/six.py", line 414, in next
web_1    |     return type(self).__next__(self)
web_1    |   File "/usr/lib64/python2.7/site-packages/django/http/response.py", line 295, in __next__
web_1    |     return self.make_bytes(next(self._iterator))
web_1    |   File "/opt/pgd/pgd_search/dump/DataDump.py", line 320, in next
web_1    |     line = self.buffer.pop(0)
web_1    | IndexError: pop from empty list
web_1    | [06/May/2016 12:24:27] "GET /search/dump/ HTTP/1.1" 500 59
web_1    | Traceback (most recent call last):
web_1    |   File "/usr/lib64/python2.7/SocketServer.py", line 593, in process_request_thread
web_1    |     self.finish_request(request, client_address)
web_1    |   File "/usr/lib64/python2.7/SocketServer.py", line 334, in finish_request
web_1    |     self.RequestHandlerClass(request, client_address, self)
web_1    |   File "/usr/lib64/python2.7/site-packages/django/core/servers/basehttp.py", line 126, in __init__
web_1    |     super(WSGIRequestHandler, self).__init__(*args, **kwargs)
web_1    |   File "/usr/lib64/python2.7/SocketServer.py", line 649, in __init__
web_1    |     self.handle()
web_1    |   File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 124, in handle
web_1    |     handler.run(self.server.get_app())
web_1    |   File "/usr/lib64/python2.7/wsgiref/handlers.py", line 92, in run
web_1    |     self.close()
web_1    |   File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 33, in close
web_1    |     self.status.split(' ',1)[0], self.bytes_sent
web_1    | AttributeError: 'NoneType' object has no attribute 'split'

The last error is due to the IndexError before that, which is probably due to the first error in the list.

L5ss is interesting because there are two attributes on the residue model named L5 and ss with adjacent definitions.

mathuin commented 8 years ago

The problem was a missing comma. The hard part was writing a test. PR incoming!

mathuin commented 8 years ago

This issue was resolved by #54.