2011-09-11 2 views
1

このスクリプト:AppEngineのPythonスクリプトでこのimaplibエラーの原因は何ですか?

import imaplib 

    user = "[email protected]" 
    pwd = "***" 

    m = imaplib.IMAP4_SSL("imap.gmail.com") 
    m.login(user,pwd) 
    m.select("Inbox") # here you a can choose a mail box like INBOX instead 
    m.search("NEW") 

は私のために、このエラーになります:

Traceback (most recent call last): 
    File "c:\Program Files\Google\google_appengine\google\appengine\ext\webapp\_webapp25.py", line 701, in __call__ 
    handler.get(*groups) 
    File "c:\Users\Dave\git_stuff\Touch Base\Touch Base\main.py", line 30, in get 
    m = imaplib.IMAP4_SSL("imap.gmail.com") 
    File "c:\Python26\lib\imaplib.py", line 1138, in __init__ 
    IMAP4.__init__(self, host, port) 
    File "c:\Python26\lib\imaplib.py", line 163, in __init__ 
    self.open(host, port) 
    File "c:\Python26\lib\imaplib.py", line 1149, in open 
    self.sock = socket.create_connection((host, port)) 
AttributeError: 'module' object has no attribute 'create_connection' 

なぜ?

+0

これらの参照された行は表示できますか? 1149&163? – Coffee

+1

ここではPythonのソースコードをコピーしませんが、違いがあれば完全なスタックトレースを記入します。 – Trindaz

答えて

関連する問題