informatics-isi-edu / hatrac

Simple object storage for collaborations
Apache License 2.0
3 stars 1 forks source link

Internal error "TypeError %d format: a number is required, not NoneType" #29

Closed bugacov closed 8 years ago

bugacov commented 8 years ago

This errors happens randomly in GPCR when trying to access the Helix and Snake plots under the Target details page. Here's the stack trace for a recent error:

Mon Jun 20 16:29:34.375845 2016] [:error] [pid 28200] [remote 128.9.184.181:24] Traceback (most recent call last): [Mon Jun 20 16:29:34.375889 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/web/application.py", line 239, in process [Mon Jun 20 16:29:34.375893 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return self.handle() [Mon Jun 20 16:29:34.375896 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/web/application.py", line 230, in handle [Mon Jun 20 16:29:34.375899 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return self._delegate(fn, self.fvars, args) [Mon Jun 20 16:29:34.375902 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/web/application.py", line 405, in _delegate [Mon Jun 20 16:29:34.375904 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return handle_class(f) [Mon Jun 20 16:29:34.375906 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/web/application.py", line 396, in handle_class [Mon Jun 20 16:29:34.375909 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return tocall(*args) [Mon Jun 20 16:29:34.375911 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/rest/init.py", line 67, in GET [Mon Jun 20 16:29:34.375913 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return self.METHOD('GET') [Mon Jun 20 16:29:34.375915 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/rest/init.py", line 61, in METHOD [Mon Jun 20 16:29:34.375917 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return method(_matchgroups) [Mon Jun 20 16:29:34.375919 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/rest/core.py", line 214, in wrapper [Mon Jun 20 16:29:34.375921 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return original_method(_args) [Mon Jun 20 16:29:34.375923 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/rest/core.py", line 502, in GET [Mon Jun 20 16:29:34.375926 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return self._GET(_args) [Mon Jun 20 16:29:34.375928 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/rest/name.py", line 191, in _GET [Mon Jun 20 16:29:34.375930 2016] [:error] [pid 28200] [remote 128.9.184.181:24] resource = resource.get_current_version() [Mon Jun 20 16:29:34.375933 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/model/directory/pgsql.py", line 286, in get_current_version [Mon Jun 20 16:29:34.375935 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return self.directory.get_current_version(self) [Mon Jun 20 16:29:34.375943 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/model/directory/pgsql.py", line 726, in wrapper [Mon Jun 20 16:29:34.375956 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return args[0].pc.perform(db_thunk, transform) [Mon Jun 20 16:29:34.375959 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/model/directory/pgsql.py", line 608, in perform [Mon Jun 20 16:29:34.375961 2016] [:error] [pid 28200] [remote 128.9.184.181:24] result = bodyfunc(self.conn, self.cur) [Mon Jun 20 16:29:34.375963 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/model/directory/pgsql.py", line 725, in db_thunk [Mon Jun 20 16:29:34.375966 2016] [:error] [pid 28200] [remote 128.9.184.181:24] return original_method(_args1, conn=conn, cur=cur) [Mon Jun 20 16:29:34.375968 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/model/directory/pgsql.py", line 1041, in get_current_version [Mon Jun 20 16:29:34.375971 2016] [:error] [pid 28200] [remote 128.9.184.181:24] results = self._version_list(conn, cur, object.id, limit=1) [Mon Jun 20 16:29:34.375974 2016] [:error] [pid 28200] [remote 128.9.184.181:24] File "/usr/lib/python2.7/site-packages/hatrac/model/directory/pgsql.py", line 1279, in _version_list [Mon Jun 20 16:29:34.375976 2016] [:error] [pid 28200] [remote 128.9.184.181:24]("%d" % limit) if limit is not None else 'NULL' [Mon Jun 20 16:29:34.375978 2016] [:error] [pid 28200] [remote 128.9.184.181:24] TypeError: %d format: a number is required, not NoneType [Mon Jun 20 16:29:34.375989 2016] [:error] [pid 28200] [remote 128.9.184.181:24]

and the corresponding line from ssl_access_log:

128.9.184.181 - - [20/Jun/2016:16:29:34 -0700] "GET /hatrac/target/IMPT-5HT1B/IMPT-5HT1B_snake.html HTTP/1.1" 500 21

karlcz commented 8 years ago

@bugacov what version of the code (commit ID or tag) is running on this server?

bugacov commented 8 years ago

hatrac is at rbk-20160601.1

On Mon, Jun 20, 2016 at 5:10 PM, Karl Czajkowski notifications@github.com wrote:

@bugacov https://github.com/bugacov what version of the code (commit ID or tag) is running on this server?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/informatics-isi-edu/hatrac/issues/29#issuecomment-227306304, or mute the thread https://github.com/notifications/unsubscribe/AKDL2cpso53NE-DSabgQ-O0gJ8Oz3FBGks5qNyvZgaJpZM4I6Piw .[image: Web Bug from https://github.com/notifications/beacon/AKDL2f74ONkPE5dGh8GOIlk-hnUL09msks5qNyvZgaJpZM4I6Piw.gif]

karlcz commented 8 years ago

I have a hard time explaining this bug unless it is related to the other lazy sequencing scenario being investigated in #28 already. I'm only adding another assert statement to check an internal invariant prior to the code that threw the exception in your stack trace. We'll need to investigate those revised stack traces if you encounter any more errors...

karlcz commented 8 years ago

This cannot seem to be reproduced and there are doubts about the server state at time of error...