bfs18 / nsynth_wavenet

parallel wavenet based on nsynth
106 stars 30 forks source link

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' #31

Closed ishandutta2007 closed 6 years ago

ishandutta2007 commented 6 years ago

I downloaded pretrained model : https://drive.google.com/file/d/17bt6laBcTcjZCsLUzdTjtaH2hQQyki8E/view created a directory PWN_LOGDIR and then executed

ishandutta2007@MacBook-Pro:~/Documents/Projects/nsynth_wavenet$ python eval_parallel_wavenet.py --ckpt_dir PWN_LOGDIR --source_path "tests/test_data" --save_path "tests/pred_data"

ERROR:tensorflow:Couldn't match files for checkpoint /Users/ishandutta2007/Documents/Projects/nsynth_wavenet/PWN_LOGDIR/model.ckpt-170610 Traceback (most recent call last): File "eval_parallel_wavenet.py", line 94, in generate(args) File "eval_parallel_wavenet.py", line 23, in generate assert tf.train.checkpoint_exists(checkpoint_path) File "/Users/ishandutta2007/.pyenv/versions/3.6.0/lib/python3.6/site-packages/tensorflow/python/training/checkpoint_management.py", line 363, in checkpoint_exists saver_pb2.SaverDef.V2) File "/Users/ishandutta2007/.pyenv/versions/3.6.0/lib/python3.6/site-packages/tensorflow/python/training/checkpoint_management.py", line 313, in _prefix_to_checkpoint_path return prefix + ".index" # The index file identifies a checkpoint. TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

ishandutta2007 commented 6 years ago

From the above error we can see the code looks for file without the extension eval which the downloaded checkpoints had.

I had to remane the downloaded files from model.ckpt-170610-eval.data-00000-of-00001 to model.ckpt-170610.data-00000-of-00001 model.ckpt-170610-eval.index to model.ckpt-170610.index