tum-lkn / tcgui

A lightweight Python-based Web-GUI for Linux traffic control (tc) to set, view and delete traffic shaping rules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Traceback issue

amol7a opened this issue · comments

Observed below issue while executing script

root@jump1:~# python3 main.py --ip 10.84.119.56 --port 5000 --dev ens224

  • Running on http://10.84.119.56:5000/ (Press CTRL+C to quit)
    [2020-07-01 16:45:48,018] ERROR in app: Exception on / [GET]
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "/usr/lib/python3/dist-packages/flask/_compat.py", line 33, in reraise
    raise value
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functionsrule.endpoint
    File "main.py", line 61, in main
    "main.html", rules=rules, units=BANDWIDTH_UNITS, standard_unit=STANDARD_UNIT
    File "/usr/lib/python3/dist-packages/flask/templating.py", line 133, in render_template
    return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
    File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 869, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
    File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
    File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
    File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
    File "/usr/lib/python3/dist-packages/flask/templating.py", line 57, in get_source
    return self._get_source_fast(environment, template)
    File "/usr/lib/python3/dist-packages/flask/templating.py", line 85, in _get_source_fast
    raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: main.html
    10.65.93.199 - - [01/Jul/2020 16:45:48] "GET / HTTP/1.1" 500 -

Please check

This sound like main.py cannot find the template folder. Do you have the same folder structure as in the repo?

Thank you hofbi. I had copied only main.py initially. Now copied whole folder. It worked expected. Thank you