mimetools.py模块是否适用于Google App Engine

时间:2011-03-09 17:47:56

标签: python google-app-engine

我收到了此错误消息..

有什么问题?

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'

1 个答案:

答案 0 :(得分:2)

AppEngine不支持socket库。 See the docs