Error "The value NIL is not of type NUMBER" while trying to treebanking with [incr tsdb()] (Trees->Annotate)

I am trying to treebank using [incr tsdb()], which I start from the LKB-FOS terminal window. The profile was parsed with ACE. I can see the results fine. However, when I click on Trees->Annotate (which I believe is the thing to do to start treebanking? ItsdbTreebanking_ItsdbAnnotation · delph-in/docs Wiki · GitHub), I see the following error:

(base) olga@condorito:~/delphin/tools/lkb_fos$ ./lkb.linux_x86_64 
Welcome to LKB 5.6 (built with SBCL, 07:15:03 20 Jun 2023)

; loading #P"/home/olga/.tsdbrc"

* /home/olga/delphin/GAUSS/gauss-repo/grammars/srg-mal/util
(tsdb:tsdb :podium)
* create-cache(): write-through mode for `cow4_test'.
[10:08:57] browse-trees(): 2 active items in annotation set.
[10:08:57] browse-tree(): `cow4_test' --- item # 1550029
podium-loop(): The value NIL is not of type NUMBER

I think I have seen this error before, and perhaps it has an easy fix, but I couldn’t find the answer here or in my mailbox.

With [incr tsdb()] the first thing to check is whether your Relations file is up-to-date…

It’s recent enough I think? It’s the one I’ve been using lately, I think it originally comes from the Matrix. In any case, it worked for pydelphin and so on.

PyDelphin does not care at all* whether the relations file follows some canonical schema. As I recall, [incr tsdb()] is the strictest about using an up-to-date version, and the ACE tools are somewhere in between. So I wouldn’t rely on it working with non-[incr tsdb()] tools as evidence that it’s up-to-date. That said, I don’t think it’s been updated in a while and the Matrix version should be fine, but I usually refer to the ERG’s tsdb/skeletons/Relations or LOGON’s lingo/lkb/src/tsdb/skeletons/english/Relations if I want something most likely to be compatible.

* As a convenience, PyDelphin does codify minimal information about canonical test suites, such as which files are included in skeletons and the default values of a few attributes, but these are not necessary.

1 Like

The thing is, I am pretty sure my relations file is OK. I have updated it at the start of working on the project.

Any special reason for not using FFTB?

Any special reason for not using FFTB?

yes, see here: Assessing the accuracy of treebanks parsed with a parse ranking model - #9 by olzama

@olzama and I debugged this yesterday, and I created a fix which she is now using. The issue was in [incr tsdb()] and concerned the updating of the progress bar. The next release of LKB-FOS (coming soon) will include the fix.

In short, there were 3 things wrong: missing checks on variable values; use of a coding idiom that led to an uninformative error message; and an unsafe optimisation declaration to the compiler. The latter might have masked the issue previously.