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

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 <module> 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!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 19

Most upvoted comments

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.

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

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

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

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.

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.

我也遇到了python3.7, 3.8

(https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz),去上面下载预制模型,然后放在你执行spleeter时的当前目录下,然后你神奇的发现可以了!需要解压。

I have the same problem.

OS; Windows 10 Installation type: Conda

Finally, I used docker image to run spleeter successfully.