Open JOJ0 opened 3 years ago
Hey JOJ0, you don't have to change any filenames. I got this error also by myself, this occured because i ran the script one time with wrong creds and then the second time the script does a backup to last_playlist.txt and pulls the fresh playlists from spotify to playlist.txt. Now there aren't any diffs between these files, so nothing lands into new_playlist.txt. Fix: Remove playlist.txt, last_playlist.txt, new_playlist.txt and run the script again with correct creds. If creds are wrong, try again but again remove the playlist files before doing so. This should help with your issue. Greets
Hi @cloudishBenne, thanks again for the explanation. Deleting the 3 playlist files indead fixes the "Importing 0 playlists to Deezer" issue, it correctly tells me now that "43 playlists are imported".
But still I see this in error_log.log and the import seems to hang/never get finished:
2021-08-07 08:12:22,780 - error_log:216 - ERROR - {'error': {'type': 'DataException', 'message': 'no data', 'code': 800}}
2021-08-07 08:12:23,382 - error_log:216 - ERROR - {'error': {'type': 'DataException', 'message': 'no data', 'code': 800}}
2021-08-07 08:12:23,991 - error_log:216 - ERROR - {'error': {'type': 'DataException', 'message': 'no data', 'code': 800}}
2021-08-07 08:12:24,586 - error_log:216 - ERROR - {'error': {'type': 'DataException', 'message': 'no data', 'code': 800}}
And after a while it fails with:
Traceback (most recent call last):
File "/Users/jojo/git/spotify-to-deezer/deezer_upload/upload_to_deezer.py", line 336, in main
start_import()
File "/Users/jojo/git/spotify-to-deezer/deezer_upload/upload_to_deezer.py", line 269, in start_import
playlist = find_playlist(li['name'], USER_ID)
File "/Users/jojo/git/spotify-to-deezer/deezer_upload/upload_to_deezer.py", line 232, in find_playlist
return find_playlist(playlist_name, user_id)
File "/Users/jojo/git/spotify-to-deezer/deezer_upload/upload_to_deezer.py", line 232, in find_playlist
return find_playlist(playlist_name, user_id)
File "/Users/jojo/git/spotify-to-deezer/deezer_upload/upload_to_deezer.py", line 232, in find_playlist
return find_playlist(playlist_name, user_id)
[Previous line repeated 970 more times]
File "/Users/jojo/git/spotify-to-deezer/deezer_upload/upload_to_deezer.py", line 229, in find_playlist
playlists = retrieve_deezer_data(playlists_url)
File "/Users/jojo/git/spotify-to-deezer/deezer_upload/upload_to_deezer.py", line 214, in retrieve_deezer_data
response = requests.get(deezer_api_url+'?token={token}').json()
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1349, in getresponse
response.begin()
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 335, in begin
self.headers = self.msg = parse_headers(self.fp)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 234, in parse_headers
return email.parser.Parser(_class=_class).parsestr(hstring)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/parser.py", line 67, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/parser.py", line 56, in parse
feedparser.feed(data)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/feedparser.py", line 176, in feed
self._call_parse()
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/feedparser.py", line 180, in _call_parse
self._parse()
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/feedparser.py", line 295, in _parsegen
if self._cur.get_content_maintype() == 'message':
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/message.py", line 594, in get_content_maintype
ctype = self.get_content_type()
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/message.py", line 578, in get_content_type
value = self.get('content-type', missing)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/message.py", line 471, in get
return self.policy.header_fetch_parse(k, v)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/_policybase.py", line 316, in header_fetch_parse
return self._sanitize_header(name, value)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/_policybase.py", line 287, in _sanitize_header
if _has_surrogates(value):
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/email/utils.py", line 57, in _has_surrogates
s.encode()
RecursionError: maximum recursion depth exceeded while calling a Python object
Hi, great tool. had to adapt some things to get it run but now seems to work (use FILENAME=playlist.txt instead of new_playlist.txt did fix that always output said "Importing 0 playlists to Deezer")
But since just now I am constantly getting this in error log:
Is it possible that I hit a Deezer API ratelimit or something? Any suggestions how to further debug this issue! Thanks a ton in advance! Great tool again! Appreciate the work! Jojo