After I fixed an error that the http exception does not have a method json ( I just removed the part from the print) I get another HTTPException after too many timeouts. Its probably the api hard limiting I guess?
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/Users/secretunicorn/Downloads/spotify_to_tidal/sync.py", line 126, in _enumerate_wrapper
return (index, repeat_on_http_error(function, value, **kwargs))
File "/Users/secretunicorn/Downloads/spotify_to_tidal/sync.py", line 121, in repeat_on_http_error
return repeat_on_http_error(function, *args, remaining=remaining-1, **kwargs)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/sync.py", line 121, in repeat_on_http_error
return repeat_on_http_error(function, *args, remaining=remaining-1, **kwargs)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/sync.py", line 121, in repeat_on_http_error
return repeat_on_http_error(function, *args, remaining=remaining-1, **kwargs)
[Previous line repeated 1 more time]
File "/Users/secretunicorn/Downloads/spotify_to_tidal/sync.py", line 110, in repeat_on_http_error
return function(*args, **kwargs)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/sync.py", line 87, in tidal_search
album_result = tidal_session.search(simple(spotify_track['album']['name']) + " " + simple(spotify_track['album']['artists'][0]['name']), models=[tidalapi.album.Album])
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/tidalapi/session.py", line 446, in search
json_obj = self.request.request('GET', 'search', params=params).json()
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/tidalapi/request.py", line 97, in request
request = self.basic_request(method, path, params, data, headers)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/tidalapi/request.py", line 62, in basic_request
request = self.session.request_session.request(method, url, params=request_params, data=data, headers=headers)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/requests/adapters.py", line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/secretunicorn/Downloads/spotify_to_tidal/./sync.py", line 292, in <module>
sync_list(spotify_session, tidal_session, get_user_playlist_mappings(spotify_session, tidal_session, config), config)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/./sync.py", line 228, in sync_list
repeat_on_http_error(sync_playlist, spotify_session, tidal_session, spotify_id, tidal_id, config)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/./sync.py", line 110, in repeat_on_http_error
return function(*args, **kwargs)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/./sync.py", line 210, in sync_playlist
tidal_tracks = call_async_with_progress(tidal_search, spotify_tracks, task_description, config.get('subprocesses', 50), tidal_session=tidal_session)
File "/Users/secretunicorn/Downloads/spotify_to_tidal/./sync.py", line 131, in call_async_with_progress
for index, result in tqdm(process_pool.imap_unordered(partial(_enumerate_wrapper, function=function, **kwargs),
File "/Users/secretunicorn/Downloads/spotify_to_tidal/venv/lib/python3.10/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/pool.py", line 873, in next
raise value
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))