Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TemplateNotFound #307

Open
koellerMC opened this issue Jun 12, 2024 · 4 comments
Open

TemplateNotFound #307

koellerMC opened this issue Jun 12, 2024 · 4 comments

Comments

@koellerMC
Copy link

koellerMC commented Jun 12, 2024

Dear HistoQC Team,
I just pulled the latest docker image and let histoQC run on a file, without errors.
However, when starting the UI I get the following error:
Screenshot from 2024-06-12 17-33-05

The CMD output is:

/opt/HistoQC/venv/lib/python3.8/site-packages/umap/distances.py:1063: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/opt/HistoQC/venv/lib/python3.8/site-packages/umap/distances.py:1071: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/opt/HistoQC/venv/lib/python3.8/site-packages/umap/distances.py:1086: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/opt/HistoQC/venv/lib/python3.8/site-packages/umap/umap_.py:660: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
 * Serving Flask app '__main__'
 * Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://172.17.0.2:5000
Press CTRL+C to quit
 * Restarting with stat
/opt/HistoQC/venv/lib/python3.8/site-packages/umap/distances.py:1063: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/opt/HistoQC/venv/lib/python3.8/site-packages/umap/distances.py:1071: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/opt/HistoQC/venv/lib/python3.8/site-packages/umap/distances.py:1086: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/opt/HistoQC/venv/lib/python3.8/site-packages/umap/umap_.py:660: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
 * Debugger is active!
 * Debugger PIN: 143-466-257
172.17.0.1 - - [12/Jun/2024 15:26:57] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/flask/app.py", line 2213, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/flask/app.py", line 2193, in wsgi_app
    response = self.handle_exception(e)
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/histoqc/ui/HQC_html.py", line 16, in index
    return render_template('index.html')
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/flask/templating.py", line 150, in render_template
    template = app.jinja_env.get_or_select_template(template_name_or_list)
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/jinja2/environment.py", line 1084, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/jinja2/environment.py", line 1013, in get_template
    return self._load_template(name, globals)
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/jinja2/environment.py", line 972, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/jinja2/loaders.py", line 126, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/flask/templating.py", line 64, in get_source
    return self._get_source_fast(environment, template)
  File "/opt/HistoQC/venv/lib/python3.8/site-packages/flask/templating.py", line 98, in _get_source_fast
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: index.html
172.17.0.1 - - [12/Jun/2024 15:26:57] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
172.17.0.1 - - [12/Jun/2024 15:26:57] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
172.17.0.1 - - [12/Jun/2024 15:26:57] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
172.17.0.1 - - [12/Jun/2024 15:26:57] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 304 -

If I understand correctly there seems to be some problem with the 'Index.html' of the flask app?

Do you have an idea how i can resolve this?

Thank you in advance!

Best
MK

@koellerMC
Copy link
Author

A ok I fugured it out. One has to:

cd /opt/HistoQC

Then it works just fine.

Potentially, this could be added to the readme.md. Or the ui.CLI could be independent of the directory it is called.

Thanks again for the amazing tool.
Best
MK

@jacksonjacobs1
Copy link
Collaborator

Hi @koellerMC,

Thanks for reporting this issue. This is indeed a bug; the user's current directory should not affect HistoQC's behavior.

I've reproduced the problematic behavior on my side and am working on a fix. Will get back to you soon.

@jacksonjacobs1
Copy link
Collaborator

Update: This bug was fixed in commit 6f0bacd

Thanks again for reporting the issue. Please let me know if you have any further issues

@koellerMC
Copy link
Author

Hi @jacksonjacobs1
Thank you very much for the fast fix!
We will try it out ASAP.

KR
MK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants