DevinZ1993/Chinese-Poetry-Generation

local variable 'data' referenced before assignment

dm-druid opened this issue · 4 comments

Hello,
When I run '$python data_utils.py', it gives the error message like that:

File "corpus.py", line 63, in get_all_corpus
corpus.extend(data)
UnboundLocalError: local variable 'data' referenced before assignment

My python version is 2.7.10.
I don't know where the problem is.

Probably because _parse_corpus encounters some exception. Could you surround corpus.py line 61 with another try-catch and print out whatever exception that you catch?

That's quite similar to the previous issue here: unichr not supported by narrow python build. Hope this can help.

It works. So many thanks.