Forums

Internal Server Error won't stop showing up

Up until yesterday, there was no internal server error on our flask app. I've looked inside of our error log and can't find anything about this problem. i have no clue what's going on.

    2019-09-07 18:47:12,868: Exception on / [GET]
Traceback (most recent call last):
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app.py", line 17, in home
    return render_template('index.html')
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/templating.py", line 138, in render_template
    ctx.app.jinja_env.get_or_select_template(template_name_or_list),
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/jinja2/environment.py", line 869, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/templating.py", line 60, in get_source
    return self._get_source_fast(environment, template)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/templating.py", line 89, in _get_source_fast
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: index.html
2019-09-07 18:47:15,673: Exception on /form/ [GET]
Traceback (most recent call last):
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app.py", line 38, in process_form
    return render_template('form.html')
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/templating.py", line 138, in render_template
    ctx.app.jinja_env.get_or_select_template(template_name_or_list),
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/jinja2/environment.py", line 869, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/templating.py", line 60, in get_source
    return self._get_source_fast(environment, template)
  File "/home/eabsenteeproject/.virtualenvs/deploy/lib/python3.7/site-packages/flask/templating.py", line 89, in _get_source_fast
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: form.html

Here's our last two errors. But literally this doens't make any sense, form.html is in the templates folder, so this isn't right at all. Any help? Dull please? It seems the staff doesnt really help that much

[edit by admin: formatting]

what changes have you made to your web app recently?

literally none - i've checked the blame on app.py, and there is nearly nothing. there's 0 changes to app.py or anything. the templates folder is all the same. it should be able to acces templates, but it just says that form.html and index.html are not able to be found

Try setting the config option EXPLAIN_TEMPLATE_LOADING to True. See this for more info.

It seems the staff doesnt really help that much

Giles wants to know your location

Where would it log this information once it's been updated? On the flask site itself?

On localhost, it works. Just online, it won't work at all

Dull, you're literally a genius. By telling me that I was able to catch the most stupidest error; it was going to the wrong folder for some absurd reason within the directory, and causing it to search for the incorect file. Thank you so much. You're quite literally the biggest help possible

ur welcome

I don't know how to make spagetti. Hopefully I'm still considered a genius

I have an F in spagetti class

PA didn't even hire me and I'm basically doing this job better than Conrad

Well, Conrad is on vacation right now...

He’s probably secretly attending the Area 51 raid or applying for a job at DigitalOcean...