spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
17.78k stars 1.62k forks source link

DistributionNotFound: setup.cfg uses "wrong" beautifulsoup4 #1209

Closed timschumi closed 3 years ago

timschumi commented 3 years ago

Environment

Expected Behaviour

spotdl should not throw an Exception.

Actual Behaviour

spotdl threw an Exception.

Steps to Reproduce

Install spotdl on a system that only has the beautifulsoup4 package, not the bs4 package (because bs4 is just a metapackage to pull in beautifulsoup4, so not all distributions have it in their repository).


Traceback

Traceback (most recent call last):
  File "/usr/bin/spotdl", line 33, in <module>
    sys.exit(load_entry_point('spotdl==3.4.0', 'console_scripts', 'spotdl')())
  File "/usr/bin/spotdl", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/spotdl/__init__.py", line 1, in <module>
    from .__main__ import console_entry_point
  File "/usr/lib/python3.9/site-packages/spotdl/__main__.py", line 7, in <module>
    from spotdl.download.downloader import DownloadManager
  File "/usr/lib/python3.9/site-packages/spotdl/download/downloader.py", line 16, in <module>
    from spotdl.download.progressHandlers import DisplayManager, DownloadTracker
  File "/usr/lib/python3.9/site-packages/spotdl/download/progressHandlers.py", line 11, in <module>
    from spotdl.search.songObj import SongObj
  File "/usr/lib/python3.9/site-packages/spotdl/search/songObj.py", line 3, in <module>
    from spotdl.search.provider import search_and_get_best_match, get_song_lyrics
  File "/usr/lib/python3.9/site-packages/spotdl/search/provider.py", line 11, in <module>
    from ytmusicapi import YTMusic
  File "/usr/lib/python3.9/site-packages/ytmusicapi/__init__.py", line 2, in <module>
    from ytmusicapi.ytmusic import YTMusic
  File "/usr/lib/python3.9/site-packages/ytmusicapi/ytmusic.py", line 4, in <module>
    import pkg_resources
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'bs4' distribution was not found and is required by spotdl

Any other information:

This is fixed when bs4 in the setup.cfg is replaced by beautifulsoup4.

Silverarmor commented 3 years ago

resolved in 40c077b