Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2426) when trying to upload file to Deta drive #90

Open
deepaerial opened this issue Jul 15, 2023 · 3 comments

Comments

@deepaerial
Copy link
Contributor

Machine:
Docker container from image: python:3.10-bullseye

Deta lbrary version: 1.1.0

Description:
Error bellows occurs when I'm trying to upload file to Deta drive:

EOF occurred in violation of protocol (_ssl.c:2426)
Traceback (most recent call last):
  File "/app/./ytdl_api/downloaders.py", line 180, in download
    asyncio.run(self.on_finish_callback(download, converted_file_path))
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/app/./ytdl_api/callbacks.py", line 99, in on_finish_callback
    in_storage_filename = storage.save_download_from_file(download, download_tmp_path)
  File "/app/./ytdl_api/storage.py", line 68, in save_download_from_file
    self.drive.put(download.storage_filename, path=path)
  File "/app/.venv/lib/python3.10/site-packages/deta/drive.py", line 195, in put
    raise e
  File "/app/.venv/lib/python3.10/site-packages/deta/drive.py", line 188, in put
    self._upload_part(name, chunk, upload_id, part, content_type)
  File "/app/.venv/lib/python3.10/site-packages/deta/drive.py", line 137, in _upload_part
    self._request(
  File "/app/.venv/lib/python3.10/site-packages/deta/service.py", line 74, in _request
    res = self._send_request_with_retry(method, url, headers, body)
  File "/app/.venv/lib/python3.10/site-packages/deta/service.py", line 114, in _send_request_with_retry
    self.client.request(
  File "/usr/local/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1077, in _send_output
    self.send(chunk)
  File "/usr/local/lib/python3.10/http/client.py", line 999, in send
    self.sock.sendall(data)
  File "/usr/local/lib/python3.10/ssl.py", line 1237, in sendall
    v = self.send(byte_view[count:])
  File "/usr/local/lib/python3.10/ssl.py", line 1206, in send
    return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2426)
@hozan23
Copy link
Contributor

hozan23 commented Sep 17, 2023

Hey @deepaerial Are you still experiencing this issue?

@deepaerial
Copy link
Contributor Author

Hey @hozan23 just checked again my code on deta-python version 1.1.0 and I did not manage to reproduce error again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@deepaerial @hozan23 and others