On Tue, Aug 26, 2008 at 2:50 AM, Benjamin Buch <[EMAIL PROTECTED]> wrote:
> > Hi, > > I'm working with the most recent versions of both django and photologue. > When I add photologue to the INSTALLED_APPS, the testserver stops > working and I get this traceback: > > Validating models... > Unhandled exception in thread started by <function inner_run at > 0x4020b0> > Traceback (most recent call last): > File "/Library/Python/2.5/site-packages/django/core/management/ > commands/runserver.py", line 47, in inner_run > self.validate(display_num_errors=True) > File "/Library/Python/2.5/site-packages/django/core/management/ > base.py", line 122, in validate > num_errors = get_validation_errors(s, app) > File "/Library/Python/2.5/site-packages/django/core/management/ > validation.py", line 28, in get_validation_errors > for (app_name, error) in get_app_errors().items(): > File "/Library/Python/2.5/site-packages/django/db/models/ > loading.py", line 128, in get_app_errors > self._populate() > File "/Library/Python/2.5/site-packages/django/db/models/ > loading.py", line 57, in _populate > self.load_app(app_name, True) > File "/Library/Python/2.5/site-packages/django/db/models/ > loading.py", line 72, in load_app > mod = __import__(app_name, {}, {}, ['models']) > File "/Users/benjamin/Code/django/apps/photologue/models.py", line > 119, in <module> > class Gallery(models.Model): > File "/Library/Python/2.5/site-packages/django/db/models/base.py", > line 88, in __new__ > new_class.add_to_class(obj_name, obj) > File "/Library/Python/2.5/site-packages/django/db/models/base.py", > line 139, in add_to_class > value.contribute_to_class(cls, name) > File "/Users/benjamin/Prog/django/birchcove/tagging/fields.py", > line 33, in contribute_to_class > AttributeError: 'module' object has no attribute 'connect' > > The strange thing is that the directory 'Prog' doesn't exist any more, > so there is no file /Users/benjamin/Prog/django/birchcove/tagging/ > fields.py. > > Why is the traceback referring to a non-existent file? > And, as I'm fairly new to python and not even close to being familiar > with tracebacks, could someone please tell me what's going on here in > general? > > The traceback shows the sequence of calls made. So runserver.py on line 47 called self.validate... which wound up on line 122 of base.py calling get_validation_errors, etc. until you get to line 139 of base.py caling contribute_to_class on value, which apparently takes you into your fields.py under Prog/django/birchcove/tagging....only you say that no longer exists? Are you sure you deleted Prog entirely or just the source .py files under it? I've seen tracebacks referring to non-existent files only when the compiled Python files (.pyc) created for them still exist. Solution is usually to delete all .pyc files from the tree to make sure all the old stuff is really gone. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---