im having an issue with accessing files in my project. Opening an index.html or a .json file in my python code is causing me issues. How do if find the directory of these files in the koyeb server?
UPDATE:
Seems like its also another issue because, when I replaced ‘index.html’ in return_render_template(‘index.html’) with the full html code, it gives me this issue:
NOTE: I am not encountering this problem on the localhost which Koyeb provides in the logs.
File "/app/app.py", line 567, in home
return render_template(index_template)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/flask/templating.py", line 151, in render_template
template = app.jinja_env.get_or_select_template(template_name_or_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/jinja2/environment.py", line 1081, in get_or_select_template
return self.get_template(template_name_or_list, parent, globals)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/jinja2/environment.py", line 1010, in get_template
return self._load_template(name, globals)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/jinja2/environment.py", line 969, in _load_template
template = self.loader.load(self, name, self.make_globals(globals))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/jinja2/loaders.py", line 126, in load
source, filename, uptodate = self.get_source(environment, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/flask/templating.py", line 65, in get_source
return self._get_source_fast(environment, template)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/flask/templating.py", line 99, in _get_source_fast
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: <!DOCTYPE html>
…