首页 新闻 搜索 专区 学院

Python

0
[已关闭问题] 关闭于 2016-10-17 01:08

錯誤提示如下:   檢查過代碼 沒有寫錯字,我也查了下路徑是不是寫錯文件名,沒有。  不知道哪裏錯了,請指教,謝謝!

 

 

[E 161017 00:45:41 web:1496] Uncaught exception GET / (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8000', method='GET', uri='/', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate', 'Host': 'localhost:8000', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0', 'Connection': 'keep-alive', 'If-None-Match': '"0cd7aeffaee6ea8e50a5c7a675d9070b5d605902"', 'Upgrade-Insecure-Requests': '1'})
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 1413, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "/home/andy/PrivateWeb/handlers/index.py", line 9, in get
        self.render("index.html")
      File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 704, in render
        html = self.render_string(template_name, **kwargs)
      File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 811, in render_string
        return t.generate(**namespace)
      File "/usr/lib/python2.7/dist-packages/tornado/template.py", line 278, in generate
        return execute()
      File "index_html.generated.py", line 5, in _tt_execute
        _tt_tmp = static_url("js/jquery.min.js")  # index.html:14
      File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 1276, in static_url
        self.require_setting("static_path", "static_url")
      File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 1294, in require_setting
        "application to use %s" % (name, feature))
    Exception: You must define the 'static_path' setting in your application to use static_url

问题补充:

補充下, 我在瀏覽器打開這個地址時顯示 500: Internal Server Error

偽人的主页 偽人 | 初学一级 | 园豆:103
提问于:2016-10-17 00:49
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册