V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
flyeblue
V2EX  ›  Python

关于 bottle 的中文链接的问题

  •  
  •   flyeblue · 2016-11-28 16:58:48 +08:00 · 1892 次点击
    这是一个创建于 2916 天前的主题,其中的信息可能已经有所发展或是发生改变。

    关于 bottle 的中文链接的问题

    我发现类似 “/z/讨厌啃苹果.html ”或者 “/z/%E8%AE%A8%E5%8E%8C%E5%95%83%E8%8B%B9%E6%9E%9C.html ”都会直接报错误“ Critical error while processing request ”,请问应该怎么解决?

    1 条回复    2016-11-28 17:15:31 +08:00
    flyeblue
        1
    flyeblue  
    OP
       2016-11-28 17:15:31 +08:00
    相关的错误提示:
    Error:

    RuntimeError('Request context not initialized.',)

    Traceback:

    Traceback (most recent call last):
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 1653, in fget
    try: return ls.var
    AttributeError: '_thread._local' object has no attribute 'var'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 954, in wsgi
    out = self._cast(self._handle(environ))
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 907, in _cast
    out = self.error_handler.get(out.status_code, self.default_error_handler)(out)
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 842, in default_error_handler
    return tob(template(ERROR_PAGE_TEMPLATE, e=res))
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 3609, in template
    return TEMPLATES[tplid].render(kwargs)
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 3399, in render
    self.execute(stdout, env)
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 3386, in execute
    eval(self.co, env)
    File "<string>", line 17, in <module>
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 1249, in url
    return self.urlparts.geturl()
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 165, in __get__
    key, storage = self.key, getattr(obj, self.attr)
    File "C:\Users\Administrator\Anaconda3\lib\site-packages\bottle.py", line 1655, in fget
    raise RuntimeError("Request context not initialized.")
    RuntimeError: Request context not initialized.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1161 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 18:20 · PVG 02:20 · LAX 10:20 · JFK 13:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.