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

Broken if using --m3u option? #1441

Closed
antoniocosta opened this issue Dec 17, 2021 · 6 comments · Fixed by #1442 or #1444
Closed

Broken if using --m3u option? #1441

antoniocosta opened this issue Dec 17, 2021 · 6 comments · Fixed by #1442 or #1444
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed

Comments

@antoniocosta
Copy link

System OS

Linux

Python Version

3.8 (CPython)

Install Source

pip / PyPi

Install version / commit hash

v3.9.1

Expected Behavior vs Actual Behavior

Spotdl used to be working just fine but recently seems to be broken. Will not download but instead exit if --m3u option is used.

Steps to reproduce

spotdl [playlist_url] --m3u

Traceback

Traceback (most recent call last):
File "/home/username/.local/bin/spotdl", line 8, in <module>
    sys.exit(console_entry_point())
  File "/home/username/.local/lib/python3.8/site-packages/spotdl/console/__init__.py", line 78, in console_entry_point
    song_list = parse_query(
  File "/home/username/.local/lib/python3.8/site-packages/spotdl/parsers/query_parser.py", line 29, in parse_query
    parse_request(
  File "/home/username/.local/lib/python3.8/site-packages/spotdl/parsers/query_parser.py", line 107, in parse_request
    song_list = song_gatherer.from_playlist(
  File "/home/username/.local/lib/python3.8/site-packages/spotdl/search/song_gatherer.py", line 327, in from_playlist
    for result in results:
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator
    yield fs.pop().result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/username/.local/lib/python3.8/site-packages/spotdl/search/song_gatherer.py", line 305, in get_song
    file_path = _parse_path_template(path_template, song, output_format)
  File "/home/username/.local/lib/python3.8/site-packages/spotdl/providers/provider_utils.py", line 129, in _parse_path_template
    converted_file_name = converted_file_name.format(
AttributeError: 'NoneType' object has no attribute 'format'

Other details

No response

@antoniocosta antoniocosta added the Bug Unexpected problem or unintended behavior that needs to be fixed label Dec 17, 2021
@antoniocosta
Copy link
Author

Reverting to spotdl v3.8.0 fixed it for me.

@xnetcat
Copy link
Member

xnetcat commented Dec 17, 2021

fixed in #1442

@xnetcat xnetcat linked a pull request Dec 17, 2021 that will close this issue
10 tasks
@xnetcat
Copy link
Member

xnetcat commented Dec 20, 2021

@antoniocosta fixed on dev branch

@xnetcat xnetcat closed this as completed Dec 20, 2021
@Silverarmor
Copy link
Member

Not fully resolved on dev branch @xnetcat

If a song has already been downloaded, and try to download it in a playlist using --m3u, error still occurs

PS G:\spotDL> spotdl --m3u https://open.spotify.com/playlist/1hyNdhiS85lWlFa5kO1pOx
Fetching Playlist...
Skipping "Conan Gray - Heather" as it's already downloaded
Found YouTube URL for "Ashe - Moral of the Story" : https://www.youtube.com/watch?v=Is9fu7IzuQ4

Traceback (most recent call last):
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\search\song_gatherer.py", line 299, in get_song
    song = from_spotify_url(
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\search\song_gatherer.py", line 72, in from_spotify_url
    raise OSError(f"{converted_file_name} already downloaded")
OSError: Conan Gray - Heather already downloaded

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\console\__init__.py", line 78, in console_entry_point
    song_list = parse_query(
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\parsers\query_parser.py", line 29, in parse_query
    parse_request(
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\parsers\query_parser.py", line 107, in parse_request
    song_list = song_gatherer.from_playlist(
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\search\song_gatherer.py", line 333, in from_playlist
    for result in results:
  File "c:\program files\python39\lib\concurrent\futures\_base.py", line 600, in result_iterator
    yield fs.pop().result()
  File "c:\program files\python39\lib\concurrent\futures\_base.py", line 433, in result
    return self.__get_result()
  File "c:\program files\python39\lib\concurrent\futures\_base.py", line 389, in __get_result
    raise self._exception
  File "c:\program files\python39\lib\concurrent\futures\thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\search\song_gatherer.py", line 323, in get_song
    file_path = _parse_path_template(path_template, song_obj, output_format)
  File "C:\Users\Silver\AppData\Roaming\Python\Python39\site-packages\spotdl\providers\provider_utils.py", line 129, in _parse_path_template
    converted_file_name = converted_file_name.format(
AttributeError: 'NoneType' object has no attribute 'format'

@Silverarmor Silverarmor reopened this Dec 24, 2021
@Ubuntufanboy
Copy link

Still is not fixed. I will attempt to fix

@xnetcat xnetcat mentioned this issue Dec 25, 2021
10 tasks
@xnetcat xnetcat linked a pull request Dec 25, 2021 that will close this issue
10 tasks
@xnetcat
Copy link
Member

xnetcat commented Jan 3, 2022

fixed on dev

@xnetcat xnetcat closed this as completed Jan 3, 2022
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.

4 participants