gae本地无法运行解决方法

今天在本地运行micolog出现错误regex invalid: unbalanced parenthesis上网搜了下,终于在一篇英文里找到解决方法。

Change lines 2369-70 in <installdir>\google\appengine\tools\dev_appserver.py from:

1
2
regex = os.path.join(re.escape(regex), '(.*)') 
path = os.path.join(path, '\\1')

to:

1
2
regex = re.escape(regex) + '/(.*)' 
path = path + '/\\1'

这个问题决之后竟然又出现错误

2010-08-30 20:05:53 Running command: “[‘C:\Python25\python.exe’, ‘C:\Program Files\Google\google_appengine\dev_appserver.py’, ‘–admin_console_server=’, ‘–port=8081’, ‘C:\Program Files\Google\google_appengine\micolog0’]”
WARNING  2010-08-30 20:05:54,559 datastore_file_stub.py] Could not read datastore data from c:\users\admini~1\appdata\local\temp\dev_appserver.datastore.history
INFO     2010-08-30 20:05:54,573 dev_appserver_main.py] Running application seogroupshare on port 8081: http://localhost:8081
INFO     2010-08-30 20:05:58,381 model.py] module base reloaded
INFO     2010-08-30 20:05:58,552 base.py] module base reloaded
ERROR    2010-08-30 20:05:58,739 dev_appserver.py] Exception encountered handling request
Traceback (most recent call last):
  File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”, line 2245, in _HandleRequest
    base_env_dict=env_dict)
  File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”, line 334, in Dispatch
    base_env_dict=base_env_dict)
  File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”, line 1743, in Dispatch
    self._module_dict)
  File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”, line 1654, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
  File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”, line 1555, in ExecuteOrImportScript
    exec module_code in script_module.dict
  File “C:\Program Files\Google\google_appengine\micolog0\blog.py”, line 720, in
    main()
  File “C:\Program Files\Google\google_appengine\micolog0\blog.py”, line 715, in main
    g_blog.application=application
AttributeError: ‘NoneType’ object has no attribute ‘application’
INFO     2010-08-30 20:05:58,739 dev_appserver.py] “GET / HTTP/1.1” 500 -

这次是怎么也搞不定了,google一下竟然就只有十几个页面,而且都和这没关系。期待谁能帮我解决下啊。