3

尝试在 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 -
4

3 回答 3

2

我从未使用过 Kamal Gill 的 repo,但我通常使用开花的 Flask GAE 骨架。它更容易使用。简单地说,更改应用标识符,将你的谷歌应用引擎指向 gae 文件夹,你基本上就设置好了。

于 2012-06-19T07:51:57.403 回答
1

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

于 2012-07-30T05:39:15.683 回答
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

于 2012-06-20T19:52:15.533 回答