bandcampsync icon indicating copy to clipboard operation
bandcampsync copied to clipboard

Sync throws an error after downloading a few albums successfully

Open rcampoamor opened this issue 2 months ago • 1 comments

After listing out all the items to download, sometimes the app will download one, sometimes four, sometimes 6 albums and then throw this error. Re-running the app will download a few more or fail immediately. There doesn't seem to be a pattern. Could this be the result of some sort of throttling on the BC side?

Traceback (most recent call last): File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/urllib3/response.py", line 779, in _error_catcher yield File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/urllib3/response.py", line 904, in _raw_read data = self._fp_read(amt, read1=read1) if not fp_closed else b"" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/urllib3/response.py", line 887, in _fp_read return self._fp.read(amt) if amt is not None else self._fp.read() ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/http/client.py", line 479, in read s = self.fp.read(amt) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/socket.py", line 707, in readinto return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/ssl.py", line 1252, in recv_into return self.read(nbytes, buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/ssl.py", line 1104, in read return self._sslobj.read(len, buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2559)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/requests/models.py", line 820, in generate yield from self.raw.stream(chunk_size, decode_content=True) File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/urllib3/response.py", line 1091, in stream data = self.read(amt=amt, decode_content=decode_content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/urllib3/response.py", line 980, in read data = self._raw_read(amt) ^^^^^^^^^^^^^^^^^^^ File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/urllib3/response.py", line 903, in _raw_read with self._error_catcher(): File "/usr/lib/python3.12/contextlib.py", line 158, in exit self.gen.throw(value) File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/urllib3/response.py", line 790, in _error_catcher raise SSLError(e) from e urllib3.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2559)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/rc/.venvs/myenv/bin/bandcampsync", line 62, in do_sync(cookies_path, cookies, dir_path, media_format, temp_dir, ign_patterns, notify_url) File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/bandcampsync/init.py", line 69, in do_sync download_file(download_file_url, temp_file) File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/bandcampsync/download.py", line 58, in download_file for chunk in r.iter_content(chunk_size=chunk_size): File "/home/rc/.venvs/myenv/lib/python3.12/site-packages/requests/models.py", line 828, in generate raise RequestsSSLError(e) requests.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2559)

rcampoamor avatar Oct 22 '25 18:10 rcampoamor

That's a new one to me. It could potentially be throttling, however that would be very unusual throttling if it was the case. I'd wait to see if this just magically resolves itself like the other HTTP errors.

Obviously this is a remote issue so there's not a great deal bandcampsync can do.

meeb avatar Oct 23 '25 03:10 meeb