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

jinja2.exceptions.TemplateNotFound: googlemaps/gmapjs.html #66

Closed
treyh1 opened this issue Mar 21, 2018 · 2 comments
Closed

jinja2.exceptions.TemplateNotFound: googlemaps/gmapjs.html #66

treyh1 opened this issue Mar 21, 2018 · 2 comments

Comments

@treyh1
Copy link

treyh1 commented Mar 21, 2018

Not sure if this is an issue with Flask-Googlemaps or just human error. I am currently using the library on an app deployed on Heroku, and now see the following error when I try to load a page where I am calling Flask-Googlemaps.

2018-03-20T15:05:30.959296+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/flask_googlemaps/__init__.py", line 703, in render
2018-03-20T15:05:30.959297+00:00 app[web.1]:     return render_template(*args, **kwargs)
2018-03-20T15:05:30.959299+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/flask/templating.py", line 133, in render_template
2018-03-20T15:05:30.959301+00:00 app[web.1]:     return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
2018-03-20T15:05:30.959302+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/flask/templating.py", line 57, in get_source
2018-03-20T15:05:30.959304+00:00 app[web.1]:     return self._get_source_fast(environment, template)
2018-03-20T15:05:30.959306+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/flask/templating.py", line 85, in _get_source_fast
2018-03-20T15:05:30.959308+00:00 app[web.1]:     raise TemplateNotFound(template)
2018-03-20T15:05:30.959393+00:00 app[web.1]: jinja2.exceptions.TemplateNotFound: googlemaps/gmapjs.html

I recently changed the app from having a single "journal.py" module which contained everything (routes, config stuff, models) to one where all this was spread across multiple modules. Previously my app looked like this...

/journal
    journal.py
    Procfile
    requirements.txt
    runtime.txt
    /templates
    /static

Now it looks like this....

/journal
    /app
        __init__.py
        models.py
        routes.py
        config.py
        /templates
        /static
    journal.py
    Procfile
    requirements.txt
    runtime.txt

I have confirmed that I am using the latest version (0.2.5).

This is an awesome tool. It has really made my life easy. Thanks for making it available to the community.

@ghost
Copy link

ghost commented Jun 26, 2018

same issue here, did u end up fixing it?
tryna use it with app(/map-unbounded/)

@treyh1
Copy link
Author

treyh1 commented Jun 27, 2018

Hey it turned out I was missing this very important line...

GoogleMaps(app, key="foobar")

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