OpenNMT Forum

Having trouble running toy example

Hello, I recently installed OpenNMT but getting the following error when going through the toy example.

I have macOS Big Sur 11.2.1
I have python2.7 and python3.9 installed.

pip install --upgrade OpenNMT-py==2.0.0rc1
wget https://s3.amazonaws.com/opennmt-trainingdata/toy-ende.tar.gz
tar xf toy-ende.tar.gz
cd toy_ende

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/onmt_build_vocab", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/onmt/bin/build_vocab.py", line 63, in main
    build_vocab_main(opts)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/onmt/bin/build_vocab.py", line 23, in build_vocab_main
    ArgumentParser.validate_prepare_opts(opts, build_vocab_only=True)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/onmt/utils/parse.py", line 127, in validate_prepare_opts
    cls._validate_data(opt)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/onmt/utils/parse.py", line 42, in _validate_data
    cls._validate_file(path_src, info=f'{cname}/path_src')
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/onmt/utils/parse.py", line 18, in _validate_file
    raise IOError(f"Please check path of your {info} file!")
OSError: Please check path of your corpus_1/path_src file!

The cd toy-ende should be removed here, since the paths in the config and next example command include it.

1 Like