Annotald / annotald

A program for annotation in the Penn Treebank format
GNU General Public License v3.0
8 stars 3 forks source link

Freezing #45

Open diertani opened 10 years ago

diertani commented 10 years ago

I was trying to change an ICH to a *, on the grounds that it seemed to let me, and it did let me, but after it let me, the tool froze up, and now it won't let me use the mouse to do anything to the trees. It will let me save things, and do other things in the left panel, but I can't click nodes.

There was this error message on the terminal:

self.thefile is: macaulay-1833.psd
[07/Apr/2014:08:32:36] HTTP 
Request Headers:
  Content-Length: 172690
  REFERER: http://localhost:1234/
  HOST: localhost:1234
  ORIGIN: http://localhost:1234
  CONNECTION: keep-alive
  Remote-Addr: 127.0.0.1
  ACCEPT: */*
  USER-AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36
  X-REQUESTED-WITH: XMLHttpRequest
  ACCEPT-LANGUAGE: en-US,en;q=0.8
  Content-Type: application/x-www-form-urlencoded
  ACCEPT-ENCODING: gzip,deflate,sdch
[07/Apr/2014:08:32:36] HTTP Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 656, in respond
   response.body = self.handler()
  File "/usr/local/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/local/lib/python2.7/site-packages/annotald/treedrawing.py", line 156, in doSave
    tosave.split("\n\n")))
  File "/usr/local/lib/python2.7/site-packages/annotald/treedrawing.py", line 155, in <lambda>
    lambda t: unicode(util.rewriteIndices(T.Tree(t))),
  File "/usr/local/lib/python2.7/site-packages/annotald/util.py", line 442, in rewriteIndices
    if _hasIndex(t):
  File "/usr/local/lib/python2.7/site-packages/annotald/util.py", line 407, in _hasIndex
    return bool(_getIndex(tree))
 File "/usr/local/lib/python2.7/site-packages/annotald/util.py", line 401, in _getIndex
    i = _getIndexInner(tree, 2)
  File "/usr/local/lib/python2.7/site-packages/annotald/util.py", line 387, in _getIndexInner
    if _shouldIndexLeaf(tree):
  File "/usr/local/lib/python2.7/site-packages/annotald/util.py", line 431, in _shouldIndexLeaf
    if not isinstance(tree[0], basestring):
  File "/usr/local/lib/python2.7/site-packages/nltk/tree.py", line 150, in __getitem__
    return list.__getitem__(self, index)
IndexError: list index out of range

It was repeated a second time.

aecay commented 10 years ago

I cannot reproduce this. If it happens again, please look for an error message in the Javascript Console in Chrome (Menu > Tools).

aecay commented 10 years ago

I've also added some debugging code to make the stack trace you provided more informative if it occurs in the future.