question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version 1.4 seems to break when django.templates.backends has not been initialized

See original GitHub issue

This 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:closed
  • Created 7 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
clokepcommented, Feb 2, 2017

@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.

1reaction
PamelaMcommented, Jan 31, 2017

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found