jjjake/internetarchive

cant upload file

Opened this issue · 4 comments

ia upload windows7-by-TecWindow windows7
windows7-by-TecWindow:
 uploading /windows7/windows7-x64bit.iso:   9%|███▊                                      | 287/3168 [00:30<12:15,  3.92MiB/s]Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1076, in _send_output
    self.send(chunk)
  File "/usr/lib/python3.10/http/client.py", line 998, in send
    self.sock.sendall(data)
  File "/usr/lib/python3.10/ssl.py", line 1237, in sendall
    v = self.send(byte_view[count:])
  File "/usr/lib/python3.10/ssl.py", line 1206, in send
    return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2396)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/dist-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='s3.us.archive.org', port=443): Max retries exceeded with url: /windows7-by-TecWindow/windows7/windows7-x64bit.iso (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2396)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/ia", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/internetarchive/cli/ia.py", line 171, in main
    sys.exit(ia_module.main(argv, session))
  File "/usr/local/lib/python3.10/dist-packages/internetarchive/cli/ia_upload.py", line 259, in main
    for _r in _upload_files(item, files, upload_kwargs):
  File "/usr/local/lib/python3.10/dist-packages/internetarchive/cli/ia_upload.py", line 100, in _upload_files
    response = item.upload(files, **upload_kwargs)
  File "/usr/local/lib/python3.10/dist-packages/internetarchive/item.py", line 1222, in upload
    resp = self.upload_file(filepath,
  File "/usr/local/lib/python3.10/dist-packages/internetarchive/item.py", line 1072, in upload_file
    response = self.session.send(prepared_request,
  File "/usr/local/lib/python3.10/dist-packages/internetarchive/session.py", line 540, in send
    raise e
  File "/usr/local/lib/python3.10/dist-packages/internetarchive/session.py", line 537, in send
    reraise_modify(e, e.request.url, prepend=False)  # type: ignore
  File "/usr/local/lib/python3.10/dist-packages/internetarchive/session.py", line 534, in send
    r = super().send(request, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: (MaxRetryError("HTTPSConnectionPool(host='s3.us.archive.org', port=443): Max retries exceeded with url: /windows7-by-TecWindow/windows7/windows7-x64bit.iso (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2396)')))"), 'https://s3.us.archive.org/windows7-by-TecWindow/windows7/windows7-x64bit.iso')
 uploading /windows7/windows7-x64bit.iso:   9%|███▊                                      | 287/3168 [00:30<05:09,  9.30MiB/s]
maxz commented

Is this something that happens reproducibly? It seems like a transient error to me.

Or are you trying to report the crash instead of proper error handling?

Is this something that happens reproducibly? It seems like a transient error to me.

Or are you trying to report the crash instead of proper error handling?

No, the error was repeated to me a lot, but it was linked to one of my accounts, and when I used an alternative account for it, the error did not appear again.

Same error for me when trying to upload from windows, works fine in multipass.

I regenerated my IAS API tokens and then the issue disappeared.