On Sat, 2007-05-19 at 11:02 -0700, derek wrote: > i also am seeing this error: > > TypeError at /do.upload_photo > save_file() got an unexpected keyword argument 'save' > Request Method: POST > Request URL: http://local.allurstuff.com:8000/do.upload_photo > Exception Type: TypeError > Exception Value: save_file() got an unexpected keyword argument > 'save' > Exception Location: /usr/lib/python2.5/site-packages/django/db/models/ > manipulators.py in save, line 105 > > my problem can't be outdated .pyc files, as i have just rebuilt this > machine and this is a fresh django 0.96 install. can you tell me what > i can do to help debug this problem?
I guess I'd start by putting some debugging prints into django/db/models/manipulators.py. If you have a look at the line that is failing, you can see the if-test just above it that checks that "f" is a FileField instance. If you haven't installed any third-party apps that would add extra FileField sub-classes (one thing to check), "f" should be either a FileField or an ImageField, both of which are defined in django/db/models/fields/__init__.py (and both of whose save_file() methods have a "save" argument). So let's check that "f" really is what we think it is. What is f.__class__.__name__ at the point of the error? We can also look at what the arguments are that save_fail() thinks it should be getting. Again, edit just prior to line 105 to insert something like the following: import inspect, sys print >> sys.stderr, inspect.getargspec(f.save_file) print >> sys.stderr, inspect.getsourcefile(f.__class__) Maybe some of the output there will give you or us some more clues about where the problem could lie. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---