Spleeter: ValueError: Can't load save_path when it is None

Created on 27 Mar 2020  ·  18Comments  ·  Source: deezer/spleeter

Description

After resetting my computer, I can no longer successfully run Spleeter.

Step to reproduce

  1. Installed using Conda
  2. Run $ spleeter separate -i /Users/user/Desktop/song.mp3 -p spleeter:2stems -o output
  3. Got ValueError: Can't load save_path when it is None.

Output

Traceback (most recent call last):
File "/opt/miniconda3/bin/spleeter", line 8, in
sys.exit(entrypoint())
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/__main__.py", line 54, in entrypoint
main(sys.argv)
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/__main__.py", line 46, in main
entrypoint(arguments, params)
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/commands/separate.py", line 45, in entrypoint
synchronous=False
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/separator.py", line 191, in separate_to_file
sources = self.separate(waveform, audio_descriptor)
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/separator.py", line 157, in separate
return self.separate_librosa(waveform, audio_descriptor)
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/separator.py", line 147, in separate_librosa
saver.restore(sess, latest_checkpoint)
File "/opt/miniconda3/lib/python3.7/site-packages/tensorflow/python/training/saver.py", line 1274, in restore
raise ValueError("Can't load save_path when it is None.")
ValueError: Can't load save_path when it is None.

Environment

| | |
| ----------------- | ------------------------------- |
| OS | MacOS - Mojave |
| Installation type | Conda |
| RAM available | 16 GB 2133 MHz LPDDR3 |
| Hardware spec | 2.8 GHz Intel Core i7 |

Additional context

I had no issues previously, and can't account for what may be happening here. Help is very much appreciated!

Tensorflow bug conda

Most helpful comment

If you Ctrl+C while spleeter is downloading a pretrained model, you may end up with this error, at which point you can simply delete the pretrained_models directory in your current directory and re-run spleeter to redownload the pretrained model.

All 18 comments

I have the same problem.

OS; Windows 10
Installation type: Conda

Me too, same problem. It was working before.

Still no help offered on this? Seems to be an issue many of us are having

I have the same problem.

OS; Windows 10
Installation type: Conda

Finally, I used docker image to run spleeter successfully.

any workaround ? looks like a corrupted save file from tensorflow

same problem...

same here

我也遇到了python3.7, 3.8

The error is caused by the lack of the pretrained data model.

Here is the solution: git clone spleeter to local directory, say ~/spleeter, then cd spleeter, then run the spleeter command; this time spleeter won't throw an exception, but download the pretrained data model needed for execution.

Same problem here sporadically.

spleeter separate -i "/Users/user/Music/Genre/80's Music/Ain't No Stopping Us Now - McFadden & Whitehead.mp3" -p spleeter:2stems-16kHz -o "/var/folders/ll/_n09zd5j62q2gbyhc74456m80000gn/T/vocalsplitter/results"
Traceback (most recent call last):
  File "/Users/user/opt/miniconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/user/opt/miniconda3/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/user/opt/miniconda3/lib/python3.7/site-packages/spleeter/__main__.py", line 58, in <module>
    entrypoint()
  File "/Users/user/opt/miniconda3/lib/python3.7/site-packages/spleeter/__main__.py", line 54, in entrypoint
    main(sys.argv)
  File "/Users/user/opt/miniconda3/lib/python3.7/site-packages/spleeter/__main__.py", line 46, in main
    entrypoint(arguments, params)
  File "/Users/user/opt/miniconda3/lib/python3.7/site-packages/spleeter/commands/separate.py", line 45, in entrypoint
    synchronous=False
  File "/Users/user/opt/miniconda3/lib/python3.7/site-packages/spleeter/separator.py", line 217, in separate_to_file
    sources = self.separate(waveform, audio_descriptor)
  File "/Users/user/opt/miniconda3/lib/python3.7/site-packages/spleeter/separator.py", line 184, in separate
    return self._separate_librosa(waveform, audio_descriptor)
  File "/Users/user/opt/miniconda3/lib/python3.7/site-packages/spleeter/separator.py", line 169, in _separate_librosa
    saver.restore(sess, latest_checkpoint)
  File "/Users/user/opt/miniconda3/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 1277, in restore
    raise ValueError("Can't load save_path when it is None.")
ValueError: Can't load save_path when it is None.

I have also encountered the same issue.

Hi all,

I've updated the FAQ with an entry on this. Hope this helps.

That did not work for me, @mmoussallam . It keeps throwing a AttributeError: __enter__ error.
What I did instead, which seemed to work, was to download the model directly from github (https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz) and extract them into the pretrained_mode/2stems folder. Doing that, it works

That did not work for me, @mmoussallam . It keeps throwing a AttributeError: enter error.
What I did instead, which seemed to work, was to download the model directly from github (https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz) and extract them into the pretrained_mode/2stems folder. Doing that, it works

After that, it should be uncompress in the folder.

If you Ctrl+C while spleeter is downloading a pretrained model, you may end up with this error, at which point you can simply delete the pretrained_models directory in your current directory and re-run spleeter to redownload the pretrained model.

If you Ctrl+C while spleeter is downloading a pretrained model, you may end up with this error, at which point you can simply delete the pretrained_models directory in your current directory and re-run spleeter to redownload the pretrained model.

This is exactly what I did, thank you very much.

The error is caused by the lack of the pretrained data model.

Here is the solution: git clone spleeter to local directory, say ~/spleeter, then cd spleeter, then run the spleeter command; this time spleeter won't throw an exception, but download the pretrained data model needed for execution.

git clone https://github.com/Deezer/spleeter && cd spleeter

Problem solved.
Download pretrained models from release, and then unzip&put it in spleeterpretrained_models\2stems

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cheffplayer picture cheffplayer  ·  3Comments

Rohan-Kishibe picture Rohan-Kishibe  ·  5Comments

omgwtfbbqpls picture omgwtfbbqpls  ·  3Comments

rcgale picture rcgale  ·  4Comments

ateammeech picture ateammeech  ·  3Comments