GAE Python bingapi包装程序

GAE Python bingapi包装程序,python,google-app-engine,bing-api,Python,Google App Engine,Bing Api,所以我的问题是:我正在尝试使用BingAPI包装器 我基本上下载了egg文件,并按照指南安装了它。当我从命令行运行示例代码时,它工作得很好。然而,我正在尝试将这个包装器集成到我拥有的Python Google App Engine应用程序中。当我尝试导入bingapi并运行GAE时。我在浏览器中遇到以下错误: 如有任何建议,将不胜感激。我一直在网上搜索,但没有成功 zef_file undefined, builtin open = <built-in function open>,

所以我的问题是:我正在尝试使用BingAPI包装器

我基本上下载了egg文件,并按照指南安装了它。当我从命令行运行示例代码时,它工作得很好。然而,我正在尝试将这个包装器集成到我拥有的Python Google App Engine应用程序中。当我尝试导入bingapi并运行GAE时。我在浏览器中遇到以下错误: 如有任何建议,将不胜感激。我一直在网上搜索,但没有成功

zef_file undefined, builtin open = <built-in function open>, self = <zipfile.ZipFile instance at 0x104130200>, self.filename = '/Library/Python/2.6/site-packages/bingapi-0.02.egg'
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py in __init__(self=<closed file '<uninitialized file>', mode '<uninitialized file>' at 0x1041c6e10>, filename='/Library/Python/2.6/site-packages/bingapi-0.02.egg', mode='rb', bufsize=-1, **kwargs={})
  557 
  558     if not FakeFile.IsFileAccessible(filename):
  559       raise IOError(errno.EACCES, 'file not accessible', filename)
  560 
  561     super(FakeFile, self).__init__(filename, mode, bufsize, **kwargs)
builtin IOError = <type 'exceptions.IOError'>, global errno = <module 'errno' (built-in)>, errno.EACCES = 13, filename = '/Library/Python/2.6/site-packages/bingapi-0.02.egg'

<type 'exceptions.IOError'>: [Errno 13] file not accessible: '/Library/Python/2.6/site-packages/bingapi-0.02.egg'
      args = (13, 'file not accessible')
      errno = 13
      filename = '/Library/Python/2.6/site-packages/bingapi-0.02.egg'
      message = ''
      strerror = 'file not accessible' 
zef_文件未定义,内置open=,self=,self.filename='/Library/Python/2.6/site packages/bingapi-0.02.egg'
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google\u appengine/google/appengine/tools/dev\u appserver\u import\u hook.py(self=,filename='/Library/Python/2.6/site packages/bingapi-0.02.egg',='rb','bufsize=-1,**kwargs={})
557
558如果不是FakeFile.IsFileAccessible(文件名):
559 raise IOError(errno.EACCES,“文件不可访问”,文件名)
560
561 super(伪文件,self)。\uuuuu init\uuuuuuu(文件名,模式,bufsize,**kwargs)
内置IOError=,全局errno=,errno.EACCES=13,filename='/Library/Python/2.6/site packages/bingapi-0.02.egg'
:[Errno 13]文件不可访问:'/Library/Python/2.6/site packages/bingapi-0.02.egg'
args=(13,‘文件不可访问’)
errno=13
filename='/Library/Python/2.6/site packages/bingapi-0.02.egg'
消息=“”
strerror='文件不可访问'

dev_appserver.py模拟生产环境,因此它会阻止对生产环境中不可用的任何库的访问,包括安装在系统上应用程序目录之外的任何库。若要将第三方库与App Engine一起使用,它们必须安装在您的应用程序目录中,并在那里上载到生产服务器。

感谢您的回复。因此,我在GAE应用程序中创建了一个lib文件夹,在其中添加了.egg文件,然后将该位置添加到路径中。然而,我仍然得到相同的错误/Users/alpha/Documents/APProjects/workspace/WineServer/WineServer.py in()5从google.appengine.ext导入webapp 6从google.appengine.ext.webapp.util导入运行\u wsgi\u从bingapi导入bingapi 8 9类主页(webapp.RequestHandler):bingapiundefined@Switch不要试着加鸡蛋,或者使用lib文件夹-只需将API的包目录直接放在应用程序的根目录中即可。@Nick Johnson谢谢我找到了它。按照你的建议做,效果很好