I encountered the following error while using the translate directive
command : onmt_translate -config translate_SA.yml
Traceback (most recent call last):
File "/home/ythu/anaconda3/envs/sa2/bin/onmt_translate", line 8, in
sys.exit(main())
File "/home/ythu/anaconda3/envs/sa2/lib/python3.6/site-packages/onmt/bin/translate.py", line 44, in main
translate(opt)
File "/home/ythu/anaconda3/envs/sa2/lib/python3.6/site-packages/onmt/bin/translate.py", line 15, in translate
translator = build_translator(opt, logger=logger, report_score=True)
File "/home/ythu/anaconda3/envs/sa2/lib/python3.6/site-packages/onmt/translate/translator.py", line 32, in build_translator
fields, model, model_opt = load_test_model(opt)
File "/home/ythu/anaconda3/envs/sa2/lib/python3.6/site-packages/onmt/model_builder.py", line 93, in load_test_model
opt.gpu)
File "/home/ythu/anaconda3/envs/sa2/lib/python3.6/site-packages/onmt/model_builder.py", line 197, in build_base_model
model = build_task_specific_model(model_opt, fields)
File "/home/ythu/anaconda3/envs/sa2/lib/python3.6/site-packages/onmt/model_builder.py", line 143, in build_task_specific_model
fields["src"].base_field.vocab == fields["tgt"].base_field.vocab
TypeError: list indices must be integers or slices, not str
What's the matter, please? How can I fix this?
My OpenNMT version is 2.2.At first I thought it was a version mismatch, but when I switched openNMT to 2.0, it still happened. What should I do?
I encountered the following error while using the translate directive command :
onmt_translate -config translate_SA.yml
What's the matter, please? How can I fix this?
My OpenNMT version is 2.2.At first I thought it was a version mismatch, but when I switched openNMT to 2.0, it still happened. What should I do?