Python3-discogs-client version should be >= 2.3.15

I’ve had some issues lately with beets reporting python3-discogs-client version. In my case, I’m at version 2.7 and as can be seen in the title, it complains about needing version >=2.3.15.

Here’s a list of all my python packages inside the beets virtual env:

> pip list
Package                Version
---------------------- -----------
beets                  2.0.0
beets-extrafiles       0.0.7
certifi                2024.8.30
charset-normalizer     3.3.2
confuse                2.0.1
discogs-client         2.3.0
idna                   3.10
jellyfish              1.1.0
mediafile              0.12.0
munkres                1.1.4
musicbrainzngs         0.7.1
mutagen                1.47.0
oauthlib               3.2.2
pip                    24.2
python-dateutil        2.9.0.post0
python3-discogs-client 2.7
PyYAML                 6.0.2
requests               2.32.3
setuptools             75.1.0
six                    1.16.0
typing_extensions      4.12.2
Unidecode              1.3.8
urllib3                2.2.3
wheel                  0.44.0

Any tips?

This looks to be because you’ve got discogs-client version 2.3.0 installed as well as python3-discogs-client (and for some reason beets is using the former). We probably need something in beets to handle this and show a warning if both are installed, as beets only depends on python3-discogs-client now that Python 2 support has been dropped.

OK, I tested by removing discogs-client module and I get this:

** error loading plugin discogs:
Traceback (most recent call last):
  File "/home/clmbmb/.pyenv/beets/lib/python3.11/site-packages/beets/plugins.py", line 269, in load_plugins
    namespace = __import__(modname, None, None)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/clmbmb/.pyenv/beets/lib/python3.11/site-packages/beetsplug/discogs.py", line 29, in <module>
    from discogs_client import Client, Master, Release
ModuleNotFoundError: No module named 'discogs_client'

I’m not that experienced with python, but why does it happen? I’m asking becase I created a new venv and installed beets and the other modules from scratch and I don’t get those errors.

As they both provide the same package, uninstalling one can end up breaking the other (it seems crazy to me that pip allows them to both be installed in the first place). Reinstalling python3-discogs-client should fix it:

$ pip3 install --force-reinstall python3-discogs-client

Thanks a lot for the explanation.