0
Hello, I am running a simple python code (2.7.3) to launch a webhook message on Discord and am encountering the following error:
urlopen(url).read()
File "C:\Python27\lib\urllib.py", line 86, in urlopen
return opener.open(url)
File "C:\Python27\lib\urllib.py", line 207, in open
return getattr(self, name)(url)
File "C:\Python27\lib\urllib.py", line 436, in open_https
h.endheaders(data)
File "C:\Python27\lib\httplib.py", line 954, in endheaders
self._send_output(message_body)
File "C:\Python27\lib\httplib.py", line 814, in _send_output
self.send(msg)
File "C:\Python27\lib\httplib.py", line 776, in send
self.connect()
File "C:\Python27\lib\httplib.py", line 1161, in connect
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
File "C:\Python27\lib\ssl.py", line 381, in wrap_socket
ciphers=ciphers)
File "C:\Python27\lib\ssl.py", line 143, in __init__
self.do_handshake()
File "C:\Python27\lib\ssl.py", line 305, in do_handshake
self._sslobj.do_handshake()
IOError: [Errno socket error] [Errno 8] _ssl.c:504: EOF occurred in violation of protocol
The code that is running is this:
from urllib import urlopen
url = 'https://minhaurl.com/webhook.php'
urlopen(url).read()
Note: There is no error in PHP file because I used it before. Could someone help me?
Thank you, I didn’t realize it before.
– Lucas Silva