dmlc / gluon-nlp

NLP made easy
https://nlp.gluon.ai/
Apache License 2.0
2.56k stars 538 forks source link

clean_tok_mono_corpus #1520

Closed araitats closed 3 years ago

araitats commented 3 years ago

Description

(A clear and concise description of what the bug is.) The line 238 in clean_tok_mono_corpus.py takes two variables but only one "save_path" is given.

Error Message

(Paste the complete error message, including stack trace.)

Traceback (most recent call last):
  File "/home/ec2-user/anaconda3/envs/mxnet2_p36/bin/nlp_process", line 33, in <module>
    sys.exit(load_entry_point('gluonnlp', 'console_scripts', 'nlp_process')())
  File "/home/ec2-user/SageMaker/gluon-nlp/src/gluonnlp/cli/process/__main__.py", line 33, in cli_main
    clean_tok_mono_corpus.main(sub_args)
  File "/home/ec2-user/SageMaker/gluon-nlp/src/gluonnlp/cli/process/clean_tok_mono_corpus.py", line 238, in main
    'rerun the script with --overwrite.'.format(save_path))
IndexError: tuple index out of range

To Reproduce

(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)

Steps to reproduce

(Paste the commands you ran that produced the error.)

1. 2.

What have you tried to solve it?

1. 2.

Environment

We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:

curl --retry 10 -s https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | python

# paste outputs here
szha commented 3 years ago

Thanks for the fix @akshatgui !