How to fix ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2570)

Joined
Jul 28, 2023
Messages
1
Reaction score
0
I am a beginner programmer, I started making a telegram bot in python with the telebot library, and I ran into such a problem that when I started testing the bot from several devices at the same time, the bot stopped and gave an error
Python:
Traceback (most recent call last):
File "/home/cloudshell-user/bar_5237_bot/bar_bot.py", line 71, in start
self.user_data.set_id(id)
File "/home/cloudshell-user/bar_5237_bot/utils/user_data.py", line 25, in set_id
     self.save_all_data()
File "/home/cloudshell-user/bar_5237_bot/utils/user_data.py", line 72, in save_all_data
     self.google_sheets_api.update_user_data(user_info)
File "/home/cloudshell-user/bar_5237_bot/google/google_sheets_api.py", line 139, in update_user_data
     body=body
File "/home/cloudshell-user/.local/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "/home/cloudshell-user/.local/lib/python3.7/site-packages/googleapiclient/http.py", line 932, in execute
     headers=self. headers,
File "/home/cloudshell-user/.local/lib/python3.7/site-packages/googleapiclient/http.py", line 222, in _retry_request
raise exception
File "/home/cloudshell-user/.local/lib/python3.7/site-packages/googleapiclient/http.py", line 191, in _retry_request
     resp, content = http.request(uri, method, *args, **kwargs)
File "/home/cloudshell-user/.local/lib/python3.7/site-packages/google_auth_httplib2.py", line 225, in request
     **kwargs
File "/home/cloudshell-user/.local/lib/python3.7/site-packages/httplib2/__init__.py", line 1725, in request
     conn, authority, uri, request_uri, method, body, headers, redirections, cachekey,
File "/home/cloudshell-user/.local/lib/python3.7/site-packages/httplib2/__init__.py", line 1444, in _request
     (response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/home/cloudshell-user/.local/lib/python3.7/site-packages/httplib2/__init__.py", line 1396, in _conn_request
     response = conn.getresponse()
File "/usr/lib64/python3.7/http/client.py", line 1373, in getresponse
     response.begin()
File "/usr/lib64/python3.7/http/client.py", line 319, in begin
     version, status, reason = self._read_status()
File "/usr/lib64/python3.7/http/client.py", line 280, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib64/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/lib64/python3.7/ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib64/python3.7/ssl.py", line 929, in read
return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2570)

how can this be fixed? If the information is not enough, then ask.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top