scdl-org / scdl

Soundcloud Music Downloader
GNU General Public License v2.0
3.29k stars 331 forks source link

Debug session returns `false` on everything, then errors out. #502

Closed Montana closed 1 month ago

Montana commented 2 months ago

Hey all,

So I'll run scdl, more specifically this command:

scdl -l (track link)

I've also ran a debug session this is what I've got in return:

Soundcloud Downloader
{'--addtimestamp': False,
 '--addtofile': False,
 '--auth-token': None,
 '--client-id': None,
 '--debug': True,
 '--download-archive': None,
 '--error': False,
 '--extract-artist': False,
 '--flac': False,
 '--force-metadata': False,
 '--hide-progress': False,
 '--hidewarnings': False,
 '--max-size': None,
 '--min-size': None,
 '--name-format': None,
 '--no-album-tag': False,
 '--no-original': False,
 '--no-playlist': False,
 '--no-playlist-folder': False,
 '--only-original': False,
 '--onlymp3': False,
 '--original-art': False,
 '--original-name': False,
 '--overwrite': False,
 '--path': None,
 '--playlist-name-format': None,
 '--remove': False,
 '--strict-playlist': False,
 '--sync': None,
 '-C': False,
 '-a': False,
 '-c': False,
 '-f': False,
 '-l': 'https://soundcloud.com/defectedrecords/defected-radio-show-green-velvet-takeover-120724',
 '-n': None,
 '-o': None,
 '-p': False,
 '-r': False,
 '-t': False,
 'me': False}
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/dacite/core.py", line 72, in from_dict
    value = get_default_value_for_field(field, field_type)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/dacite/dataclasses.py", line 21, in get_default_value_for_field
    raise DefaultValueNotFoundError()
dacite.dataclasses.DefaultValueNotFoundError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/scdl", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/scdl/scdl.py", line 158, in main
    if not client.is_client_id_valid():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/soundcloud/soundcloud.py", line 125, in is_client_id_valid
    next(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/soundcloud/soundcloud.py", line 480, in __call__
    yield self.convert_dict(resource)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/soundcloud/soundcloud.py", line 431, in convert_dict
    return self.return_type.from_dict(d)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/soundcloud/resource/base.py", line 19, in from_dict
    return from_dict(cls, d, cls.dacite_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/dacite/core.py", line 76, in from_dict
    raise MissingValueError(field.name)
dacite.exceptions.MissingValueError: missing value for field "track_format"

One thing I can think of is plausibly my Python version is not compatible with this version of scdl any suggestions would be wonderufl.

Cheers, Montana

7x11x13 commented 2 months ago

Looks like its using an old version of soundcloud-v2. What version of scdl do you have, and where did you install it from?

Montana commented 1 month ago

I ran upgraded soundcloud-v2 with pip, still getting same error. I'm using v2.7.3 for scdl.

7x11x13 commented 1 month ago

The latest version of scdl is 2.11.1, can you try the latest version?

Montana commented 1 month ago

This was solved by actually having to remove the binary in /bin, so had to run rm -rf scdl, for some reason pip uninstall scdl wasn't doing it. I then ran pip install scdl and grabbed latest version, now it works perfectly. Thanks for the help @7x11x13 I truly appreciate it more than you know!

7x11x13 commented 1 month ago

Sounds like an issue with having multiple versions of Python installed on your system, maybe