Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: download of a spotify playlist stops after a while #1103

Closed
dansh03 opened this issue Jan 10, 2021 · 9 comments · Fixed by #1107
Closed

Error: download of a spotify playlist stops after a while #1103

dansh03 opened this issue Jan 10, 2021 · 9 comments · Fixed by #1107
Assignees
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed

Comments

@dansh03
Copy link

dansh03 commented Jan 10, 2021

Environment

  • System OS: <Windows 10 pro 64bit>

  • Python Version: <3.9.1>

  • Install Source:
    pip
    pip install spotdl


Expected Behaviour

<started downloading playlist from Spotify, expected to finish in 10 min>

Actual Behaviour

<started downloading the playlist from Spotify, downloaded 33 songs, and then stopped and didn't continued at all>

Steps to Reproduce

  1. spotdl https://open.spotify.com/playlist/72PDqinArerCX1OlkbR6o7?si=mMU1CbmpTAevToxXt7Idjg
@dansh03 dansh03 added the Bug Unexpected problem or unintended behavior that needs to be fixed label Jan 10, 2021
@Silverarmor
Copy link
Member

Please follow our issue templates when reporting bugs or requesting features.

The devs put in hours of effort, and you should show enough respect to put in a few minutes & follow the template.
Following the template also provides us all the information we need, without having to ask for it.

Please provide

  • spotDL version pip show spotdl
  • Traceback from your attempted runs

@dansh03
Copy link
Author

dansh03 commented Jan 11, 2021

spotdl version 3.2.1
no traceback the process just stuck on 11%

@Silverarmor
Copy link
Member

Just tried to run it myself.
Note that at time of being stuck, Avicii - For A Better Day.webm, Imagine Dragons - On Top Of The World.webm, Lil Wayne - Sucker for Pain (with Wiz Khalifa Imagine Dragons Logic & Ty Dolla ign feat X Ambassadors).webm, Twenty One Pilots - Stressed Out.webm are in the Temp Folder.

Try remove the song "Sucker for Pain" from your playlist.

See traceback below.

Traceback (most recent call last):
  File "c:\program files\python39\lib\genericpath.py", line 19, in exists
    os.stat(path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: '.\\Lil Wayne - Sucker for Pain (with Wiz Khalifa, Imagine Dragons, Logic & Ty Dolla $ign feat. X Ambassadors).mp3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\program files\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\Scripts\spotdl.exe\__main__.py", line 7, in <module>
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\__main__.py", line 112, in console_entry_point
    downloader.download_multiple_songs(songObjList)
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 93, in download_multiple_songs
    self._download_asynchronously(songObjList)
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 355, in _download_asynchronously
    self.loop.run_until_complete(asyncio.gather(*tasks))
  File "c:\program files\python39\lib\asyncio\base_events.py", line 629, in run_until_complete
    self.run_forever()
  File "c:\program files\python39\lib\asyncio\windows_events.py", line 316, in run_forever
    super().run_forever()
  File "c:\program files\python39\lib\asyncio\base_events.py", line 596, in run_forever
    self._run_once()
  File "c:\program files\python39\lib\asyncio\base_events.py", line 1890, in _run_once
    handle._run()
  File "c:\program files\python39\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 350, in _pool_download
    return await self.download_song(song_obj)
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 230, in download_song
    if exists(convertedFilePath):
  File "c:\program files\python39\lib\genericpath.py", line 19, in exists
    os.stat(path)

@dansh03
Copy link
Author

dansh03 commented Jan 11, 2021

I removed the song and now it's downloaded until 61% and then stoped

@phcreery
Copy link
Contributor

I too noticed that .webm files were boing leftover but I am not sure if that is related to the issue. This could be related to #1065 where it was improved to automatically selected the highest quality option (which possibly isn't always .mp4)

_perform_audio_download() L323 as a result needs to be updated it include other filetypes.

The issue looks like it could be resolved by implementing similar changes in #1076

@Silverarmor
Copy link
Member

Silverarmor commented Jan 11, 2021

@dansh03 try install from dev, #1076 could possibly help you as @phcreery says.

Try the following:

  1. pip install pip-autoremove
  2. pip-autoremove spotdl
  3. pip cache purge
  4. pip install https://codeload.github.com/spotDL/spotify-downloader/zip/dev

@dansh03
Copy link
Author

dansh03 commented Jan 11, 2021

tried and now the traceback is
File "C:\Users\Daniel\AppData\Roaming\Python\Python39\Scripts\spotdl-script.py", line 33, in
sys.exit(load_entry_point('spotdl==3.2.1', 'console_scripts', 'spotdl')())
File "C:\Users\Daniel\AppData\Roaming\Python\Python39\site-packages\spotdl_main_.py", line 112, in console_entry_point
downloader.download_multiple_songs(songObjList)
File "C:\Users\Daniel\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 93, in download_multiple_songs
self._download_asynchronously(songObjList)
File "C:\Users\Daniel\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 355, in _download_asynchronously
self.loop.run_until_complete(asyncio.gather(*tasks))
File "c:\program files\python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "C:\Users\Daniel\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 350, in _pool_download
return await self.download_song(song_obj)
File "C:\Users\Daniel\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 300, in download_song
remove(downloadedFilePath)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\Daniel\Music\daniel2\.\Temp\ZENA - Like It.mp4'

I think its because it tries to download it as mp.4 but not sure

@dansh03
Copy link
Author

dansh03 commented Jan 11, 2021

tried to remove the song and run again but it still stuck on 62%

@dansh03
Copy link
Author

dansh03 commented Jan 11, 2021

nevermind I tried to run it from where it stopped and it worked

@dansh03 dansh03 closed this as completed Jan 11, 2021
@phcreery phcreery linked a pull request Jan 12, 2021 that will close this issue
@phcreery phcreery self-assigned this Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants