Getting weird python error when I run a simple django script in Eclipse, not happening in console
Posted
by Rhubarb
on Stack Overflow
See other posts from Stack Overflow
or by Rhubarb
Published on 2010-04-10T20:59:59Z
Indexed on
2010/04/10
21:03 UTC
Read the original article
Hit count: 413
I am running a basic script that sets up the django environment by itself, to enable me to test the ORM features of django without having to implement web pages. The script then imports one of the types defined in my models. This error doesn't happen when I run this script from iPython, only from eclipse. Simply doing this import causes a weird exception like the following:
Exception AttributeError: "'NoneType' object has no attribute 'print_exc'" in <bound method Signal._remove_receiver of <django.dispatch.dispatcher.Signal object at 0x026802B0>> ignored
My script is as follows:
from django.core.management import setup_environ
import settings
setup_environ(settings)
from stats.models import Person
for p in Person.objects.all():
print p.Name
© Stack Overflow or respective owner