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 #2

Open
ErikBjare opened this issue May 29, 2017 · 0 comments
Open

JSONDecodeError #2

ErikBjare opened this issue May 29, 2017 · 0 comments

Comments

@ErikBjare
Copy link
Member

Had run fine for a few days, then this happened...

Obviously we got a null-response somehow, might need to catch the exception and retry.

Traceback (most recent call last):...
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/erb/Programming/activitywatch/other/aw-watcher-spotify/aw_watcher_spotify/__main__.py", line 8, in <module>
    aw_watcher_spotify.main()
  File "/home/erb/Programming/activitywatch/other/aw-watcher-spotify/aw_watcher_spotify/main.py", line 114, in main
    track = get_current_track(sp)
  File "/home/erb/Programming/activitywatch/other/aw-watcher-spotify/aw_watcher_spotify/main.py", line 33, in get_current_track
    current_track = sp.current_user_playing_track()
  File "/home/erb/Programming/activitywatch/other/aw-watcher-spotify/aw_watcher_spotify/main.py", line 24, in patch_current_track
    return self._get('me/player/currently-playing')
  File "/home/erb/.local/lib/python3.5/site-packages/spotipy/client.py", line 146, in _get
    return self._internal_call('GET', url, payload, kwargs)
  File "/home/erb/.local/lib/python3.5/site-packages/spotipy/client.py", line 123, in _internal_call
    -1, '%s:\n %s' % (r.url, r.json()['error']['message']),
  File "/home/erb/.local/lib/python3.5/site-packages/requests/models.py", line 885, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant