문제

import imaplib
M=imaplib.IMAP4_SSL('imap.gmail.com', 993)

when run on my pc it works and alls fine, but on server it returns: 'module' object has no attribute 'IMAP4_SSL'

well this module clearly needs that attribute. any clue?

도움이 되었습니까?

해결책

IMAP4_SSL is only present if Python's ssl module is available (you can test with import ssl). Try upgrading your server's python version, and/or installing the ssl module.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top