IOError:[Errno 22]无效模式(' r')或文件名App Engine

时间:2015-10-12 16:24:54

标签: python google-app-engine eclipse-plugin

我完全按照本教程中的步骤操作: http://www.mkyong.com/google-app-engine/google-app-engine-python-hello-world-example-using-eclipse/

当我尝试运行时,我收到此错误:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 83, in 
    _run_file(__file__, globals())
  File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 79, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 1033, in 
    main()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 1026, in main
    dev_server.start(options)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 752, in start
    options.config_paths, options.app_id)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 795, in __init__
    module_configuration = ModuleConfiguration(config_path, app_id)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 123, in __init__
    self._config_path)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 391, in _parse_configuration
    with open(configuration_path) as f:
IOError: [Errno 22] invalid mode ('r') or filename: '\x93D:\\Helloworld/src\x93'

我完全按照步骤操作。

helloworld.py:

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):

def get(self):
    self.response.headers['Content-Type'] = 'text/plain'
    self.response.out.write('Hello, webapp World!')

application = webapp.WSGIApplication([('/', MainPage)], debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()

的app.yaml:

application: feebe-1096
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
  script: helloworld.py

我不知道为什么会这样。我只是在尝试之前就安装了eclipse,PyDev插件和app引擎SDK。

1 个答案:

答案 0 :(得分:1)

请注意错误消息中的\ x93:IOError:[Errno 22]无效模式(&#39; r&#39;)或文件名:&#39; \ x93D:\ Helloworld / src \ x93&#39; < / p>

\ x93是&#34;的代码。符号。你(很有可能)用&#34; -s输入了一个字符串,其中应该没有。请检查您的配置。并删除&#34; -s