daniel-kukiela / nmt-chatbot

NMT Chatbot
GNU General Public License v3.0
387 stars 214 forks source link

Prepare_data UnboundLocalError #154

Closed sebasyii closed 4 years ago

sebasyii commented 4 years ago

I am experiencing an UnboundLocalError. I'm not sure how I can fix this.


File: train.from
Traceback (most recent call last):
  File "prepare_data.py", line 563, in <module>
    prepare()
  File "prepare_data.py", line 79, in prepare
    number_of_records = min(amount, sum(1 for _ in open_function(source_file_name, 'rt', encoding='utf-8', **additioan_params)))
UnboundLocalError: local variable 'open_function' referenced before assignment```
kobrata6 commented 4 years ago

Hello! I see that you closed this. Can you tell me how you fixed it? Thanks!

sebasyii commented 4 years ago

Hi! If I remember correctly, I changed the name of train.from file, which is why it prompt me that error.

kobrata6 commented 4 years ago

Eh I changed it and still have the same problem. Do you mean the train.from file in data folder?

sebasyii commented 4 years ago

the train.from file from the new_data folder.