V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Rabbit52
V2EX  ›  macOS

求助,webpy 的东西在ML下跑不起了~

  •  
  •   Rabbit52 · 2012-09-15 17:00:51 +08:00 · 2936 次点击
    这是一个创建于 4452 天前的主题,其中的信息可能已经有所发展或是发生改变。
    报错如下
    Traceback (most recent call last):
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/wsgiserver/__init__.py", line 1245, in communicate
    req.respond()
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/wsgiserver/__init__.py", line 775, in respond
    self.server.gateway(self).respond()
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/wsgiserver/__init__.py", line 2018, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/httpserver.py", line 306, in __call__
    return self.app(environ, xstart_response)
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/httpserver.py", line 274, in __call__
    return self.app(environ, start_response)
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/application.py", line 279, in wsgi
    result = self.handle_with_processors()
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/application.py", line 249, in handle_with_processors
    return process(self.processors)
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/application.py", line 246, in process
    raise self.internalerror()
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/application.py", line 478, in internalerror
    return debugerror.debugerror()
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/debugerror.py", line 305, in debugerror
    return web._InternalError(djangoerror())
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/debugerror.py", line 290, in djangoerror
    djangoerror_r = Template(djangoerror_t, filename=__file__, filter=websafe)
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/template.py", line 846, in __init__
    code = self.compile_template(text, filename)
    File "/Library/Python/2.7/site-packages/web.py-0.37-py2.7.egg/web/template.py", line 926, in compile_template
    ast = compiler.parse(code)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/compiler/transformer.py", line 51, in parse
    return Transformer().parsesuite(buf)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/compiler/transformer.py", line 128, in parsesuite
    return self.transform(parser.suite(text))
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/compiler/transformer.py", line 124, in transform
    return self.compile_node(tree)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/compiler/transformer.py", line 167, in compile_node
    raise WalkerError, ('unexpected node type', n)
    WalkerError: ('unexpected node type', 339)

    搜了好久也无果
    我成功装上了 web.py 和 python-mysqldb 的, 如果一个 "hello world" 能运行成功,但是这个实在不知道怎么回事了。
    它在 win 和 linux 下都能正常运行哒
    谁帮帮我嘛~ 先谢谢了
    如果有人能帮我看看代码的问题就太感谢了 T_T
    https://github.com/Rabbit52/post_bar
    2 条回复    1970-01-01 08:00:00 +08:00
    Rabbit52
        1
    Rabbit52  
    OP
       2012-09-15 17:30:37 +08:00
    我初步调试了一下是模板问题,在render之前都没错~
    Rabbit52
        2
    Rabbit52  
    OP
       2012-09-15 17:55:16 +08:00
    搞定了,升级python到最新版就没问题了,嘿嘿!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1088 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 23:33 · PVG 07:33 · LAX 15:33 · JFK 18:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.