2011-03-09 69 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