interactive-cookbook / tagger-parser

Tagger and parser models used on our recipes corpus (data), handled with pre- and postprocessing scripts for data conversion (data-conversions)
0 stars 3 forks source link

File "reduce_graph.py": TypeError: cannot unpack non-iterable NoneType object #20

Closed irisferrazzo closed 2 years ago

irisferrazzo commented 2 years ago

Hi @TheresaSchmidt , I've tried to use reduce_graph.py to generate single action graphs with the recipes that have been tagged with bert and newly parsed. What I'm interested in is to extract the edges before the graph gets converted to the conllu format. When the script tries to open the recipe file (I've tried with 5 different ones so far and it happened always), it detects some objects of NoneType (I don't understand why, the recipes text look normal to me). If I try to rule the error out, some actions (i.e., lines of file) get lost. Do you have any ideas why that may happen? Thanks in advance!

Full body of the error message:

File "reduce_graph.py", line 348, in outfilename, File "reduce_graph.py", line 249, in main infile, desired TypeError: cannot unpack non-iterable NoneType object

TheresaSchmidt commented 2 years ago

I can't really reproduce the error. Probably, something is wrong with your input file. It should contain one recipe graph in CoNLL-U format.