cmusphinx / g2p-seq2seq

G2P with Tensorflow
Other
670 stars 194 forks source link

Error in Starting Interactive Session - Implement error message #115

Closed zhanwenchen closed 6 years ago

zhanwenchen commented 6 years ago

I just downloaded and installed this but wasn't able to start the tutorial. The command g2p-seq2seq --interactive --model_dir model.params gives two possible errors.

  1. Traceback (most recent call last):
    File "/Users/zhanwenchen/anaconda/bin/g2p-seq2seq", line 11, in <module>
    load_entry_point('g2p-seq2seq==6.1.3a0', 'console_scripts', 'g2p-seq2seq')()
    File "/Users/zhanwenchen/anaconda/lib/python3.6/site-packages/g2p_seq2seq-6.1.3a0-py3.6.egg/g2p_seq2seq/app.py", line 107, in main
    params.hparams = g2p_trainer_utils.load_params(FLAGS.model_dir)
    File "/Users/zhanwenchen/anaconda/lib/python3.6/site-packages/g2p_seq2seq-6.1.3a0-py3.6.egg/g2p_seq2seq/g2p_trainer_utils.py", line 217, in load_params
    raise StandardError("File {} not exists.".format(params_file_path))
    NameError: name 'StandardError' is not defined
  2. Traceback (most recent call last):
    File "/Users/zhanwenchen/anaconda/bin/g2p-seq2seq", line 11, in <module>
    load_entry_point('g2p-seq2seq==6.1.3a0', 'console_scripts', 'g2p-seq2seq')()
    File "/Users/zhanwenchen/anaconda/lib/python3.6/site-packages/g2p_seq2seq-6.1.3a0-py3.6.egg/g2p_seq2seq/app.py", line 107, in main
    params.hparams = g2p_trainer_utils.load_params(FLAGS.model_dir)
    File "/Users/zhanwenchen/anaconda/lib/python3.6/site-packages/g2p_seq2seq-6.1.3a0-py3.6.egg/g2p_seq2seq/g2p_trainer_utils.py", line 210, in load_params
    model_params = json.load(open(params_file_path))
    File "/Users/zhanwenchen/anaconda/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
    File "/Users/zhanwenchen/anaconda/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
    File "/Users/zhanwenchen/anaconda/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/Users/zhanwenchen/anaconda/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
nurtas-m commented 6 years ago

Hello, @zhanwenchen Sorry, but the model that we uploaded here is outdated now. Can you, please, train the model by yourself before launching "--interactive" mode? Sorry, but we are not ready to upload the new model now because of some issues.

nshmyrev commented 6 years ago

@nurtas-m Implement exception catch and rethrow with a meaningful error message

nurtas-m commented 6 years ago

Fixed with commit 762de8f57eb74bccaa3a9239f4782ab4de44af84