在本地GAE服务器上运行flask时出错[Errno 13]

时间:2012-06-18 16:57:12

标签: python google-app-engine flask

尝试在Windows上的GAE开发服务器上运行Kamal Gill的flask-appengine-template。尝试获取页面时出现此错误。已经尝试重新安装Python和App Engine。 通过谷歌搜索找不到任何类似的问题。帮助我,StackOverflow,你是我唯一的机会。

2012-06-18 19:36:29 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--admin_console_server=', '--port=8081', 'C:\\Users\\Roman Levin\\Documents\\webapps\\kamalgill-flask-appengine-template-c409e3c\\src']"
C:\Program Files (x86)\Google\google_appengine\google\appengine\api\search\search.py:232: UserWarning: DocumentOperationResult._code is deprecated. Use OperationResult._code instead.
  'Use OperationResult.%s instead.' % (name, name))
C:\Program Files (x86)\Google\google_appengine\google\appengine\api\search\search.py:232: UserWarning: DocumentOperationResult._CODES is deprecated. Use OperationResult._CODES instead.
  'Use OperationResult.%s instead.' % (name, name))
WARNING  2012-06-18 16:36:31,108 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
WARNING  2012-06-18 16:36:31,325 datastore_file_stub.py:518] Could not read datastore data from c:\users\romanl~1\appdata\local\temp\dev_appserver.datastore
INFO     2012-06-18 16:36:31,421 dev_appserver_multiprocess.py:647] Running application dev~myflaskonappengineapp on port 8081: http://localhost:8081
INFO     2012-06-18 16:36:31,421 dev_appserver_multiprocess.py:649] Admin console is available at: http://localhost:8081/_ah/admin
ERROR    2012-06-18 16:39:41,960 wsgi.py:189] 
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\wsgi.py", line 187, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\wsgi.py", line 225, in _LoadHandler
    handler = __import__(path[0])
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1858, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1722, in FindAndLoadModule
    description)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1665, in LoadModuleRestricted
    description)
  File "C:\Users\Roman Levin\Documents\webapps\kamalgill-flask-appengine-template-c409e3c\src\application\__init__.py", line 11, in <module>
    import urls
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1858, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1722, in FindAndLoadModule
    description)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1665, in LoadModuleRestricted
    description)
  File "C:\Users\Roman Levin\Documents\webapps\kamalgill-flask-appengine-template-c409e3c\src\application\urls.py", line 11, in <module>
    from application import views
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1858, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1722, in FindAndLoadModule
    description)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1665, in LoadModuleRestricted
    description)
  File "C:\Users\Roman Levin\Documents\webapps\kamalgill-flask-appengine-template-c409e3c\src\application\views.py", line 20, in <module>
    from forms import ExampleForm
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1858, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1722, in FindAndLoadModule
    description)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1665, in LoadModuleRestricted
    description)
  File "C:\Users\Roman Levin\Documents\webapps\kamalgill-flask-appengine-template-c409e3c\src\application\forms.py", line 11, in <module>
    from flaskext import wtf
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1858, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1722, in FindAndLoadModule
    description)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1665, in LoadModuleRestricted
    description)
  File "C:\Users\Roman Levin\Documents\webapps\kamalgill-flask-appengine-template-c409e3c\src\flaskext\__init__.py", line 1, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1858, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1722, in FindAndLoadModule
    description)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 676, in Decorate
    return func(self, *args, **kwargs)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 1665, in LoadModuleRestricted
    description)
  File "C:\Users\Roman Levin\Documents\webapps\kamalgill-flask-appengine-template-c409e3c\src\pkg_resources.py", line 2646, in <module>
    working_set = WorkingSet()
  File "C:\Users\Roman Levin\Documents\webapps\kamalgill-flask-appengine-template-c409e3c\src\pkg_resources.py", line 397, in __init__
    self.add_entry(entry)
  File "C:\Users\Roman Levin\Documents\webapps\kamalgill-flask-appengine-template-c409e3c\src\pkg_resources.py", line 412, in add_entry
    for dist in find_distributions(entry, True):
  File "C:\Users\Roman Levin\Documents\webapps\kamalgill-flask-appengine-template-c409e3c\src\pkg_resources.py", line 1694, in find_on_path
    for entry in os.listdir(path_item):
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_import_hook.py", line 620, in __call__
    raise OSError(errno.EACCES, 'path not accessible', path)
OSError: [Errno 13] path not accessible: 'c:\\python27\\dlls'
INFO     2012-06-18 16:39:42,016 dev_appserver.py:2904] "GET / HTTP/1.1" 500 -

3 个答案:

答案 0 :(得分:2)

我从未使用过Kamal Gill的回购,但我通常使用blossom's Flask GAE skeleton。它更容易使用。只需更改应用标识符,将Google应用引擎指向gae文件夹即可,您基本上已经设置好了。

答案 1 :(得分:1)

很高兴看到我并不疯狂。大约两周前,我在尝试使用这个完全相同的模板时遇到了同样的错误。最后,由于我刚刚开始使用Python,我实际上回过头来使用以下资源将自己拼凑在一起,而不是使用预先构建的模板。你是否偶然在virtualenv中运行这个?我还没有正式编写这一切,但是使用以下资源,我可以让Flask,GAE和Eclipse / PyDev在Windows上很好地运行。

2.6的说明 http://forum.codecall.net/topic/60323-python-on-google-app-engine-creating-blog-engine/

将GAE项目从2.6迁移到2.7 http://blog.notdot.net/2011/10/Migrating-to-Python-2-7-part-1-Threadsafe

答案 2 :(得分:1)

有同样的问题。使用64位python修复它。