ludovicchabant / PieCrust2

A simple yet powerful static website generator and lightweight CMS
Other
43 stars 8 forks source link

dashboard.html template not found #45

Closed sander76 closed 7 years ago

sander76 commented 7 years ago

trying to follow this part of the tutorial: https://bolt80.com/piecrust/en/latest/docs/admin-panel/

when running: (in which folder should I be actually ?)

chef admin run

I get the error:

Exception on / [GET]
Traceback (most recent call last):
  File "c:\virtualenvs\piecrust\lib\site-packages\flask\app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "c:\virtualenvs\piecrust\lib\site-packages\flask\app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "c:\virtualenvs\piecrust\lib\site-packages\flask\app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "c:\virtualenvs\piecrust\lib\site-packages\flask\_compat.py", line 33, in reraise
    raise value
  File "c:\virtualenvs\piecrust\lib\site-packages\flask\app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "c:\virtualenvs\piecrust\lib\site-packages\flask\app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "c:\virtualenvs\piecrust\lib\site-packages\flask_login.py", line 789, in decorated_view
    return func(*args, **kwargs)
  File "c:\virtualenvs\piecrust\lib\site-packages\piecrust\admin\views\dashboard.py", line 74, in index
    return render_template('dashboard.html', **data)
  File "c:\virtualenvs\piecrust\lib\site-packages\flask\templating.py", line 127, in render_template
    return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
  File "c:\virtualenvs\piecrust\lib\site-packages\jinja2\environment.py", line 830, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "c:\virtualenvs\piecrust\lib\site-packages\jinja2\environment.py", line 791, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "c:\virtualenvs\piecrust\lib\site-packages\jinja2\environment.py", line 765, in _load_template
    template = self.loader.load(self, name, globals)
  File "c:\virtualenvs\piecrust\lib\site-packages\jinja2\loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "c:\virtualenvs\piecrust\lib\site-packages\flask\templating.py", line 64, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: dashboard.html
ludovicchabant commented 7 years ago

I couldn't reproduce this locally but then it occurred to me that it's probably a bug with how I'm packaging PieCrust for posting on PyPi... I think I found the problem a published a new version... can you try running pip install -U PieCrust to upgrade and see if that works?

(btw, chef admin run is run from somewhere inside your website like other PieCrust commands).

Thanks a lot for the heads up!

sander76 commented 7 years ago

Works ! Thanks for fixing..