CS-SI / eodag-labextension

Jupyterlab extension for EODAG search
Apache License 2.0
18 stars 2 forks source link

TemplateNotFound error on REST API home page #4

Closed sbrunato closed 3 years ago

sbrunato commented 3 years ago

In GitLab by @ctriquet-cs on Mar 31, 2021, 16:12

WHen trying to display the home page of the REST service eg. https://jupyterhub.cnes.fr/user/username/eodag/, a 500 error occurs with log:

SingleUserLabApp - ERROR - Uncaught exception GET /user/triquetc/eodag/ (10.135.10.13)
HTTPServerRequest(protocol='http', host='jupyterhub.cnes.fr', method='GET', uri='/user/triquetc/eodag/', version='HTTP/1.1', remote_ip='10.135.10.13')
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/tornado/web.py", line 1702, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tornado/web.py", line 3173, in wrapper
    return method(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/eodag_labextension/handlers.py", line 37, in get
    content=get_home_page_content(base_url, DEFAULT_ITEMS_PER_PAGE),
  File "/usr/local/lib/python3.6/dist-packages/notebook/base/handlers.py", line 515, in render_template
    template = self.get_template(name)
  File "/usr/local/lib/python3.6/dist-packages/notebook/base/handlers.py", line 511, in get_template
    return self.settings['jinja2_env'].get_template(name)
  File "/usr/local/lib/python3.6/dist-packages/jinja2/environment.py", line 883, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/local/lib/python3.6/dist-packages/jinja2/environment.py", line 857, in _load_template
    template = self.loader.load(self, name, globals)
  File "/usr/local/lib/python3.6/dist-packages/jinja2/loaders.py", line 429, in load
    raise TemplateNotFound(name)
jinja2.exceptions.TemplateNotFound: index.html
sbrunato commented 3 years ago

In GitLab by @sbrunato on Apr 1, 2021, 16:07

index.html is still there, and so is get_home_page_content(), but they are not used any more since v2.0. (see v1.6.0)

This needs more investigation to check what fails

sbrunato commented 3 years ago

In GitLab by @ctriquet-cs on Apr 2, 2021, 15:22

assigned to @gcousin

sbrunato commented 3 years ago

In GitLab by @ctriquet-cs on Apr 15, 2021, 18:04

Fixed with a06360836c6e6cffbcd57a29e795963b09c66c0c