所以这是我的问题:我正在尝试使用bing api包装器here
我基本上下载了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'
答案 0 :(得分:2)
dev_appserver.py模仿生产环境,因此它阻止访问任何在生产中无法使用的库,包括在应用程序目录之外的系统上安装的任何库。要将第三方库与App Engine一起使用,必须将它们安装在您的应用程序目录中,以便将它们上载到生产服务器。