Forums

Error

Hello,

starting from Jan 2023, very often but not every day, I'm getting the following type of errors while before that date was not present. Why ? Is this happening because I have the free account ?

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 700, in urlopen
    self._prepare_proxy(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 994, in _prepare_proxy
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 414, in connect
    self.sock = ssl_wrap_socket(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='nodes.wavesnodes.com', port=443): Max retries exceeded with url: /transactions/broadcast (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vds89/USDNwidthdrawal/main.py", line 37, in <module>
    tx = address.invokeScript(addressDapp,
  File "/home/vds89/.local/lib/python3.10/site-packages/pywaves/address.py", line 1386, in invokeScript
    req = self.pywaves.wrapper('/transactions/broadcast', data)
  File "/home/vds89/.local/lib/python3.10/site-packages/pywaves/__init__.py", line 147, in wrapper
    req = requests.post('%s%s' % (host, api), data=postData, headers={'content-type': 'application/json'}).json()
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='nodes.wavesnodes.com', port=443): Max retries exceeded with url: /transactions/broadcast (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

2023-01-15 17:18:43 -- Completed task, took 1778.35 seconds, return code was 1.

[edit by admin: formatting]

If you're not getting it on every request, that suggests that it may be an issue with the site that you're trying to access.

But the problem is that if I launch the sript locally on my pc all these error doesn't happens so for this reason I think it is something related to pythoneverwhere service.

Are there other hints ?

All that the error is saying is that the server you're trying to connect to ended the connection while the code running on PythonAnywhere was negotiating the secure HTTPS connection. Perhaps the site that you're connecting to is occasionally blocking you for some reason? They might do that if, for example, you're making too many requests.

Could be that i'm making request with too high rate but I don't understand why this error is not showing when I launch exact the same script from my laptop and everything works correctly. That's why I'm asking here.

They may have different limits depending on location or previous behaviour.