Version 1.4 seems to break when django.templates.backends has not been initialized
See original GitHub issueThis is clearly a bug caused by my recent PR.
Coverage.py warning: Disabling plugin 'django_coverage_plugin.DjangoTemplatePlugin' due to an exception:
Traceback (most recent call last):
File "/home/teamcity/.virtualenvs/addgene1.8/local/lib/python2.7/site-packages/coverage/control.py", line 476, in _should_trace_internal
file_tracer = plugin.file_tracer(canonical)
File "/home/teamcity/.virtualenvs/addgene1.8/local/lib/python2.7/site-packages/django_coverage_plugin/plugin.py", line 158, in file_tracer
self.debug_checked = check_debug()
File "/home/teamcity/.virtualenvs/addgene1.8/local/lib/python2.7/site-packages/django_coverage_plugin/plugin.py", line 56, in check_debug
if not hasattr(django.template.backends, "django"):
I’ll work though a fix PR in the next two days.
Because of the chicken-and-egg issues of starting, I think the need for a test_project that can be used for full integration testing via subprocess calls is even more vital. There are too many “shenanigans” involved with getting coverage/django startup initialization order reversed and re-run during the current test process.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14
Top Results From Across the Web
TemplateDoesNotExist at - python - Stack Overflow
One of the problems was the missing rights. The user that executes Django, could not list the contents of the templates/ directory. chmod...
Read more >The Django admin site
Configure a DjangoTemplates backend in your TEMPLATES setting with ... As a result, the default admin interface will be provided. If you are...
Read more >913062 – Django application with python 3.3 cartridge can not ...
I've been told by Rob Millner that future versions of the python cartridge will look for app.py and run apache if app.py does...
Read more >django.template.library.invalidtemplatelibrary - You.com
in blog/templatetags/blog_tags.py . Capitalisation matters in Python variable names. It should be: from blog.models ...
Read more >PDF - Django Documentation
GeoDjango intends to be a world-class geographic Web framework. Its goal is to ... DoesNotExist: Reporter matching query does not exist.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@garyayo Use the following:
pip install https://codeload.github.com/nedbat/django_coverage_plugin/zip/4df203a0908ac638f6c6da2b2e53096eb29506e8
Note that if you already have django-coverage-plugin 1.4.1 installed pip won’t upgrade to the new code because it’s the same version number.
@garyayo Could you try with PR https://github.com/nedbat/django_coverage_plugin/pull/38? I think the fix will address both your issue and a number of other, similar ones.
Please let me know if it works for you.
Thanks Pam