boy1dr / SpleeterGui

Windows desktop front end for Spleeter - AI source separation
Apache License 2.0
2.29k stars 250 forks source link

httpx.ReadTimeout: The read operation timed out #190

Open dgdchxdeng opened 1 year ago

dgdchxdeng commented 1 year ago

There seems to be an error with running the codes, check the running idle:

Starting processing of all songs Processing C:\Users\Deng CX\Desktop\那艺娜 - 爱如火.mp3 INFO:spleeter:Downloading model archive https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz Traceback (most recent call last): File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpx_transports\default.py", line 61, in map_httpcore_exceptions yield File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpx_transports\default.py", line 106, in iter for part in self._httpcore_stream: File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpcore_sync\connection_pool.py", line 57, in iter for chunk in self.stream: File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpcore_bytestreams.py", line 56, in iter for chunk in self._iterator: File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpcore_sync\http2.py", line 435, in body_iter event = self.connection.wait_for_event(self.stream_id, timeout) File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpcore_sync\http2.py", line 242, in wait_for_event self.receive_events(timeout) File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpcore_sync\http2.py", line 249, in receive_events data = self.socket.read(self.READ_NUM_BYTES, timeout) File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpcore_backends\sync.py", line 61, in read return self.sock.recv(n) File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 130, in exit File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpcore_exceptions.py", line 12, in map_exceptions raise to_exc(exc) from None httpcore.ReadTimeout: The read operation timed out The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 193, in _run_module_as_main File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 85, in _run_code File "D:\学习\SpleeterGUI\python\Lib\site-packages\spleeter__main.py", line 262, in entrypoint() File "D:\学习\SpleeterGUI\python\Lib\site-packages\spleeter__main.py", line 256, in entrypoint spleeter() File "D:\学习\SpleeterGUI\python\Lib\site-packages\typer\main.py", line 214, in call__ return get_command(self)(*args, **kwargs) File "D:\学习\SpleeterGUI\python\Lib\site-packages\click\core.py", line 829, in call return self.main(args, kwargs) File "D:\学习\SpleeterGUI\python\Lib\site-packages\click\core.py", line 782, in main rv = self.invoke(ctx) File "D:\学习\SpleeterGUI\python\Lib\site-packages\click\core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "D:\学习\SpleeterGUI\python\Lib\site-packages\click\core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "D:\学习\SpleeterGUI\python\Lib\site-packages\click\core.py", line 610, in invoke return callback(args, kwargs) File "D:\学习\SpleeterGUI\python\Lib\site-packages\typer\main.py", line 497, in wrapper return callback(use_params) # type: ignore File "D:\学习\SpleeterGUI\python\Lib\site-packages\spleeter__main__.py", line 137, in separate synchronous=False, File "D:\学习\SpleeterGUI\python\Lib\site-packages\spleeter\separator.py", line 378, in separate_to_file sources = self.separate(waveform, audio_descriptor) File "D:\学习\SpleeterGUI\python\Lib\site-packages\spleeter\separator.py", line 321, in separate return self._separate_librosa(waveform, audio_descriptor) File "D:\学习\SpleeterGUI\python\Lib\site-packages\spleeter\separator.py", line 265, in _separate_librosa sess = self._get_session() File "D:\学习\SpleeterGUI\python\Lib\site-packages\spleeter\separator.py", line 237, in _get_session model_directory: str = provider.get(self._params["model_dir"]) File "D:\学习\SpleeterGUI\python\Lib\site-packages\spleeter\model\provider__init__.py", line 80, in get self.download(model_directory.split(sep)[-1], model_directory) File "D:\学习\SpleeterGUI\python\Lib\site-packages\spleeter\model\provider\github.py", line 145, in download for chunk in response.iter_raw(): File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpx_models.py", line 1551, in iter_raw for raw_stream_bytes in self.stream: File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpx_client.py", line 127, in iter for chunk in self._stream: File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpx_transports\default.py", line 107, in iter__ yield part File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 130, in exit File "D:\学习\SpleeterGUI\python\Lib\site-packages\httpx_transports\default.py", line 78, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ReadTimeout: The read operation timed out Finished processing all songs

Run complete

Could you please help me find what is wrong with that?

boy1dr commented 1 year ago

The error is "httpx.ReadTimeout: The read operation timed out". This means the internet didn't fetch content fast enough or was unable to access the internet.

The first time you run spleeter it will download the ai model files. Maybe there is some software like antivirus that is preventing spleeter from doing the download.

xiaxi626 commented 1 year ago

Delete the models folder in the ".../SpleeterGUI/pretrained_models" folder (e.g. "2stems"). Download the 'Spleeter public release' files from 'https://github.com/deezer/spleeter/releases' and depress them into the "pretrained_models" folder.