2011-03-09 30 views
0

我收到此錯誤消息。在Google App Engine上工作的mimetools.py模塊

問題是什麼?

Traceback (most recent call last): 
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 517, in __call__ 
    handler.post(*groups) 
    File "/base/data/home/apps/refacingme/1.348883430619943894/main.py", line 187, in post 
    upload_pic(profile["id"], user["access_token"], "test", "test.jpeg", image_source) 
    File "/base/data/home/apps/refacingme/1.348883430619943894/main.py", line 320, in upload_pic 
    form = MultiPartForm() 
    File "/base/data/home/apps/refacingme/1.348883430619943894/main.py", line 215, in __init__ 
    self.boundary = mimetools.choose_boundary() 
    File "/base/python_runtime/python_dist/lib/python2.5/mimetools.py", line 131, in choose_boundary 
    hostid = socket.gethostbyname(socket.gethostname()) 
AttributeError: 'module' object has no attribute 'gethostbyname' 

回答

2

socket庫不支持AppEngine下。 See the docs

+0

是的,但他是如何在這裏使用http://rationalpie.wordpress.com/2011/02/12/posting-photo-to-wall-using-facebook-graph-api/ – Adham 2011-03-09 18:09:55

+0

對不起,但該地址在我目前的互聯網連接上被過濾,所以我看不到你在說什麼。 – 2011-03-09 18:12:03

+2

@adham該文章中的代碼不是App Engine應用程序的一部分。 – 2011-03-09 19:26:39