On Wed, Sep 10, 2008 at 3:14 PM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
> > That seems to have done it. I need to test in a couple other spots. > > Can you let me know HOW you knew to check the .pyc files? What did I > miss? > > Lemme know. > For this problem specifically: First, I've seen numerous problem reported on this list and in the tracker from people doing the comments upgrade, and invariably the answer to fix it is "remove old .pyc files". Second, "bad magic number" means (if I recall correctly) that there's a .pyc file being loaded that was created by a version of Python that differs from the currently running version. Normally the running Python interpreter would just re-build a new .pyc file, but if it can't because the source file isn't there to be compiled, you get "bad magic number". If the source is gone it's a good bet the .pyc file should be made to go away also. More generally, whenever there's a major refactor (or even a minor one if it involves renaming or deleting files), it's a good idea to delete .pyc files before updating from svn. The .pyc files are not stored in svn, so they won't be deleted by update even when the corresponding source file is deleted. Leaving the outdated .pyc files hanging around can cause problems as they get loaded when they really shouldn't be any more, plus deletion of directories by svn update won't happen since the delete is 'obstructed' by what svn sees as locally-modified files. (If you are not updating from svn but rather using a standard install, it's best to first remove all traces of the old code...the install won't do that either.) 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 -~----------~----~----~----~------~----~------~--~---