ActivityWatch / ActivityWatch/aw-watcher-spotify

JSONDecodeError

Aberta
#2 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
88
Forks
16
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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
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)
```

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.