jbjorne / TEES

Turku Event Extraction System
147 stars 44 forks source link

classify.py error #17

Closed victoriastuart closed 8 years ago

victoriastuart commented 8 years ago

Hello; new to TEES. Tried running the following; got errors shown. Comments/solutions? Thank you, appreciated.

P.S. FYI, re: Psyco (http://psyco.sourceforge.net/): "Psyco is unmaintained and dead." ... "Just for reference, Psyco does not work on any 64-bit systems at all."

victoria:$ python classify.py -m GE11 -i 19254780 -o 19254780 Psyco not installed Opening log 19254780-log.txt at Mon Nov 23 20:31:35 2015 Classifying PubMed abstract 19254780 *** NOTE *** Do not attempt to do large-scale classification of PubMed abstracts with this feature. For that, use the downloadable PubMed release. This is a demonstration feature only, and abusing it will cause you to be banned from PubMed! ‌**** Downloading PubMed abstract 19254780 Skipping already downloaded file http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=19254780&retmode=xml Model /media/Vancouver/apps/TEES/GE11 doesn't exist, looking for a default model Classifying with default model /home/victoria/.tees/models/GE11-test Preprocessor output 19254780-preprocessed.xml.gz does not exist ------------ Preprocessing ------------ Traceback (most recent call last): File "classify.py", line 190, in preprocessorParams=options.preprocessorParams, bioNLPSTParams=options.bioNLPSTParams) File "classify.py", line 72, in classify classifyInput = preprocessor.process(input, preprocessorOutput, preprocessorParams, model, [], fromStep=detectorSteps["PREPROCESS"], toStep=None, omitSteps=omitDetectorSteps["PREPROCESS"]) File "/media/Vancouver/apps/TEES/Detectors/Preprocessor.py", line 39, in process if (type(omitSteps) in types.StringTypes and omitSteps == "CONVERT") or "CONVERT" in omitSteps: TypeError: argument of type 'NoneType' is not iterable

victoria:$ echo $TEES_SETTINGS /home/victoria/.tees_local_settings.py

victoria:$ which python /media/Vancouver/apps/anaconda/bin/python

victoria:$ python --version Python 2.7.10 :: Anaconda 2.3.0 (64-bit)

victoriastuart commented 8 years ago

Update: I'm not sure if this is correct / damaging, but I commented out lines 39-40 in ./Detectors/Preprocessor.py

if (type(omitSteps) in types.StringTypes and omitSteps == "CONVERT") or "CONVERT" in omitSteps:

        #raise Exception("Preprocessor step 'CONVERT' may not be omitted")

and that command,

python classify.py -m GE11 -i 19254780 -o 19254780

now runs/completes.

victoriastuart commented 8 years ago

FYR, here (attached) is the log file.

victoriastuart commented 8 years ago

So, attachments (Github) via Gist?

https://gist.github.com/victoriastuart/6c74f1291074beb06d4d

jbjorne commented 8 years ago

Hi Victoria,

The crash was caused by a bug introduced by the previous update to Preprocessor.py, the issue should now be fixed and the command "python classify.py -m GE11 -i 19254780 -o 19254780" should run normally. I've pushed the fix to GitHub, it should work just by replacing your TEES source code directory with the updated version (no need to re-run configure.py). Thank you for reporting the issue!

Best Regards, Jari

victoriastuart commented 8 years ago

Fabulous; thank you Jari, appreciated! :-)