ActivityWatch / ActivityWatch/aw-watcher-spotify

JSONDecodeError

Đang mở
#2 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
88
Fork
16
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.