I'm not great with Python but I've inherited a script (from a former co-worker) that is giving the above error. Here's the traceback:
File "/abackup/rob/python/mail/one_and_one/__init__.py", line 119, in open
mailbox = imaplib.IMAP4_SSL(self.host, self.port)
File "/usr/local/lib/python2.6/imaplib.py", line 1137, in __init__
IMAP4.__init__(self, host, port)
File "/usr/local/lib/python2.6/imaplib.py", line 163, in __init__
self.open(host, port)
File "/usr/local/lib/python2.6/imaplib.py", line 1150, in open
self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile)
File "/usr/local/lib/python2.6/ssl.py", line 350, in wrap_socket
suppress_ragged_eofs=suppress_ragged_eofs)
File "/usr/local/lib/python2.6/ssl.py", line 118, in __init__
self.do_handshake()
File "/usr/local/lib/python2.6/ssl.py", line 293, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [Errno 8] _ssl.c:480: EOF occurred in violation of protocol
As far as I know, this was working a month ago. I have tried Googling and looked at the only other thread of stackoverflow that references this, but it doesn't seem to apply... the error seems to be occurring within the library, since all I'm calling is the constructor with a valid hostname and port.
看来这与我们的防火墙或某些东西有关...我当然无法控制...叹气...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.