M
M
manavalit2020-05-16 18:14:50
Python
manavalit, 2020-05-16 18:14:50

How to fix error when trying to update ssl library in python?

When I start the telegram bot on the server, I get a strange error:

protocol:
transport: <_SelectorSocketTransport closing fd=6 read=idle write=>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/ asyncio/sslproto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
self ._sslobj.do_handshake()
File "/usr/local/lib/python3.7/ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl .c:1056)

I wanted to fix it by updating the ssl library used in the bot, but when I try to update, I get an error:

ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.7 -c 'import sys, setuptools, tokenize ; sys.argv[0] = '"'"'/tmp/pip-install-6hc3mtzl/ssl/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6hc3mtzl/ssl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__) ;code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile( code, __file__, '"'"'exec'"'"'))'
File "/tmp/pip-install-6hc3mtzl/ssl/setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

How to solve it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question