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.

RuntimeError on Django 1.9

See original GitHub issue

Happens when running tests on CircleCI

Traceback (most recent call last):
  File "/home/ubuntu/virtualenvs/venv-2.7.10/lib/python2.7/site-packages/nose/loader.py", line 523, in makeTest
    return self._makeTest(obj, parent)
  File "/home/ubuntu/virtualenvs/venv-2.7.10/lib/python2.7/site-packages/nose/loader.py", line 568, in _makeTest
    obj = transplant_class(obj, parent.__name__)
  File "/home/ubuntu/virtualenvs/venv-2.7.10/lib/python2.7/site-packages/nose/util.py", line 642, in transplant_class
    class C(cls):
  File "/home/ubuntu/virtualenvs/venv-2.7.10/lib/python2.7/site-packages/django/db/models/base.py", line 103, in __new__
    "application was loaded. " % (module, name))
RuntimeError: Model class nose.util.C doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. 

CircleCI environment:

Django 1.9 django-nose 1.4.2 nose 1.2.1

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
jwhitlockcommented, Dec 27, 2015

Thanks for the info - I didn’t think Testimonial would match, but I guess it does. I’ll have to avoid this as a model name, along with Testosterone and Testicles.

0reactions
sean2000commented, Dec 23, 2015

OK I got it working. I had a model called Testimonial that was causing the problem, I set __test__=False on it and now the tests pass. Thanks for the help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sphinx: runtime error django 1.9 - Stack Overflow
Currently I'm using Django 1.9 and Django Rest Framework. I'm attempting to use Sphinx and it's autodoc functions, but I'm hitting an error ......
Read more >
[Solved]-Sphinx: runtime error django 1.9-django
I don't know if this is an error fix, or a workaround: in conf.py, add: import django os.environ['DJANGO_SETTINGS_MODULE'] = 'myapp.settings' django.setup().
Read more >
31374 (Runtime Error unable to solve from forums/ FAQ.)
Runtime Error unable to solve from forums/ FAQ. ... I hit this same error trying to upgrade a simple Django 1.9.13 project from...
Read more >
RuntimeError on Django 1.9 · Issue #249 - GitHub
Its a private project. The tests are passing fine with the same code on Django 1.8.7 so i'm not sure what model classes...
Read more >
"RuntimeError: Error creating new content types."
There was a model added to the "catalog" application which is not being created in django_content_type. Manually migrating contenttypes individually generates ...
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