Hi, I'm very new in python, I created a simple script that retrieves crypto prices every 30 seconds via an API. I started my script (on the bash console) last night for the first time and today after 7am my script stopped and I had this error message :
I thought at first there was a quota overrun but I don't think so because these message appeared:
**[Previous line repeated 961 more times]**
**RecursionError: maximum recursion depth exceeded in comparison**
Do you have any idea what caused this stop of my script and how to remedy it? PS: Can we restart a batch console automatically if it crashes or only python console?
All the error message :
Traceback (most recent call last):
File "crypto_price_v1.py", line 54, in <module>
get_data()
File "crypto_price_v1.py", line 52, in get_data
get_data()
File "crypto_price_v1.py", line 52, in get_data
get_data()
File "crypto_price_v1.py", line 52, in get_data
get_data()
**[Previous line repeated 961 more times]**
File "crypto_price_v1.py", line 12, in get_data
res = requests.get(url)
File "/usr/lib/python3.7/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.7/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
conn.connect()
File "/usr/lib/python3.7/site-packages/urllib3/connection.py", line 367, in connect
cert = self.sock.getpeercert()
File "/usr/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 351, in getpeercert
'subjectAltName': get_subj_alt_name(x509)
File "/usr/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 202, in get_subj_alt_name
ext = cert.extensions.get_extension_for_class(
File "/usr/lib/python3.7/site-packages/cryptography/utils.py", line 161, in inner
result = func(instance)
File "/usr/lib/python3.7/site-packages/cryptography/hazmat/backends/openssl/x509.py", line 134, in extensions
self._backend, self._x509
File "/usr/lib/python3.7/site-packages/cryptography/hazmat/backends/openssl/decode_asn1.py", line 238, in parse
value = handler(backend, ext_data)
File "/usr/lib/python3.7/site-packages/cryptography/hazmat/backends/openssl/decode_asn1.py", line 417, in _decode_subject_alt_name
_decode_general_names_extension(backend, ext)
File "/usr/lib/python3.7/site-packages/cryptography/x509/extensions.py", line 1210, in __init__
self._general_names = GeneralNames(general_names)
File "/usr/lib/python3.7/site-packages/cryptography/x509/extensions.py", line 1163, in __init__
if not all(isinstance(x, GeneralName) for x in general_names):
File "/usr/lib/python3.7/site-packages/cryptography/x509/extensions.py", line 1163, in <genexpr>
if not all(isinstance(x, GeneralName) for x in general_names):
File "/usr/lib/python3.7/abc.py", line 139, in __instancecheck__
return _abc_instancecheck(cls, instance)
File "/usr/lib/python3.7/abc.py", line 143, in __subclasscheck__
return _abc_subclasscheck(cls, subclass)
**RecursionError: maximum recursion depth exceeded in comparison**
[edit by admin: formatting]