tobegit3hub / simple_tensorflow_serving

Generic and easy-to-use serving service for machine learning models
https://stfs.readthedocs.io
Apache License 2.0
757 stars 195 forks source link

TemplateNotFound: index.html #60

Closed R4trtry closed 3 years ago

R4trtry commented 5 years ago
2019-07-21 22:47:13 ERROR    Exception on / [GET]
Traceback (most recent call last):
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/simple_tensorflow_serving/server.py", line 376, in decorated
    return f(*decorator_args, **decorator_kwargs)
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/simple_tensorflow_serving/server.py", line 171, in index
    model_name_service_map=self.manager.model_name_service_map)
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask/templating.py", line 138, in render_template
    ctx.app.jinja_env.get_or_select_template(template_name_or_list),
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/jinja2/environment.py", line 869, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask/templating.py", line 60, in get_source
    return self._get_source_fast(environment, template)
  File "/home/x/.virtualenvs/tf/lib/python3.6/site-packages/flask/templating.py", line 89, in _get_source_fast
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: index.html

Somehow I've been stuck at this error for a while. please help :pray:

tobegit3hub commented 5 years ago

Thanks for reporting. @R4trtry

It could be the problem of uwsgi after upgrading to 0.7.0. I will work for that soon.

sonfire186 commented 4 years ago

!up

SmileTM commented 4 years ago

Thanks for reporting. @R4trtry

It could be the problem of uwsgi after upgrading to 0.7.0. I will work for that soon.

I also have this problem! python3.7 simple-tensorflow-serving 0.8.1.1 uwsgi 2.0.18

Traceback (most recent call last):
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/simple_tensorflow_serving/server.py", line 376, in decorated
    return f(*decorator_args, **decorator_kwargs)
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/simple_tensorflow_serving/server.py", line 171, in index
    model_name_service_map=self.manager.model_name_service_map)
  File "/Users/lollipop/.conda/envs/tensorflow/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 "/Users/lollipop/.conda/envs/tensorflow/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 "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/flask/templating.py", line 60, in get_source
    return self._get_source_fast(environment, template)
  File "/Users/lollipop/.conda/envs/tensorflow/lib/python3.7/site-packages/flask/templating.py", line 89, in _get_source_fast
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: index.html
easywaytodo commented 4 years ago

have you solved this issue?

tulingfeng commented 4 years ago

I encountered this problem too...

zaczou commented 4 years ago

I encountered this problem two plus...

tobegit3hub commented 3 years ago

This has been fix in https://github.com/tobegit3hub/simple_tensorflow_serving/commit/0d9fc7ebd39af09a733f9ed4a765af219ffef6d9 .

You can upgrade to version 0.8.2 by `pip install -U simple-tensorflow-serving>=0.8.2".