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

JSONDecodeError? #20

Open
nebb00 opened this issue Feb 14, 2023 · 3 comments
Open

JSONDecodeError? #20

nebb00 opened this issue Feb 14, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@nebb00
Copy link

nebb00 commented Feb 14, 2023

spotify_sync run auto --config config.json
Traceback (most recent call last):
File "/home/pi/.local/bin/spotify_sync", line 8, in
sys.exit(cli())
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/spotify_sync/main.py", line 48, in auto
app.auto()
File "/home/pi/.local/lib/python3.9/site-packages/spotify_sync/cli.py", line 39, in auto
from spotify_sync.match import MatchService
File "/home/pi/.local/lib/python3.9/site-packages/spotify_sync/match.py", line 5, in
from requests import JSONDecodeError
ImportError: cannot import name 'JSONDecodeError' from 'requests' (/usr/lib/python3/dist-packages/requests/init.py)

@jbh-cloud
Copy link
Collaborator

Hi a little more context would be useful.

Could you shoot me your dependancy versions?
python3.9 -m pip freeze | grep -E 'spot-sync|requests'

Is this an new issue / first time run?

@jbh-cloud jbh-cloud self-assigned this Feb 14, 2023
@jbh-cloud jbh-cloud added the bug Something isn't working label Feb 14, 2023
@jbh-cloud
Copy link
Collaborator

@nebb00 okay I've worked it out. It seems that the projects desired version of requests is incorrectly set for the use of JSONDecodeError. This was introduced in requests 2.27.0 but the requirements allow from 2.25.1.

Check if this works for you in the interim:

python3.9 -m pip install requests==2.27.0

then

spotify_sync run auto --config config.json

I'll bump the version assuming it does.

@ahhmino
Copy link

ahhmino commented May 4, 2023

Not the original reporter but this fixed it for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants