Re: TypeError: save() got an unexpected keyword argument 'profile_callback'
Beautiful! Thanks for this very concise response. It helped greatly. Gloria --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: TypeError: save() got an unexpected keyword argument 'profile_callback'
On Sun, Sep 27, 2009 at 6:04 PM, Gloria <strang...@comcast.net> wrote: > > Hi All, > > I have inherited some Django code, I'm porting it to a new machine, > and here is an error I'm getting, which is proving to be hard to > trace: > > Traceback (most recent call last): > > File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/ > base.py", line 92, in get_response >response = callback(request, *callback_args, **callback_kwargs) > > File "build/bdist.linux-x86_64/egg/registration/views.py", line 148, > in register > new_user = form.save(profile_callback=profile_callback) > > TypeError: save() got an unexpected keyword argument > 'profile_callback' > > I can't find build/bdist.linux-x86_64/egg/registration/views.py on my > system, strangely enough. Is this portion of Django byte compiled, > then removed? > > This isn't part of Django at all, it's an add-on package. At a guess it is django-registration, and whatever build/install process was used to put it on this machine resulted in the file spec you see. If you dig into the history of the views.py file in django-registration here: http://bitbucket.org/ubernostrum/django-registration/history/registration/views.py you'll see the last change (made in January of 2009) removed the previously-required profile_callback keyword parameter for save of the form used during registration. I'd guess then that you are moving code from a machine that had a "latest" copy of django-registration installed to a machine that has an older level, and that is what is causing the problem. Removing the old level and installing latest will likely fix it -- but could potentially break any other apps on this machine that are using the old level of django-registration. 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: TypeError: save() got an unexpected keyword argument 'profile_callback'
Some logging debug, placed in /usr/local/lib/python2.6/dist-packages/ django/core/handlers/base.py: import logging import pprint logging.error("Args: %s %s %s %s" % (pprint.pformat (callback),pprint.pformat(callback_args),pprint.pformat (callback_kwargs),pprint.pformat(request.path_info))) response = callback(request, *callback_args, **callback_kwargs The results: 2009-09-27 18:20:56,279 root: ERRORArgs: () {'form_class': } u'/users/ register/' --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
TypeError: save() got an unexpected keyword argument 'profile_callback'
Hi All, I have inherited some Django code, I'm porting it to a new machine, and here is an error I'm getting, which is proving to be hard to trace: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/ base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "build/bdist.linux-x86_64/egg/registration/views.py", line 148, in register new_user = form.save(profile_callback=profile_callback) TypeError: save() got an unexpected keyword argument 'profile_callback' I can't find build/bdist.linux-x86_64/egg/registration/views.py on my system, strangely enough. Is this portion of Django byte compiled, then removed? I'm running Django 1.2 Apha (although this also happens in 1.1) with Satchmo 0.9 on a Debian EC2 instance using WSGI. My weekend is shot :) Thank you in advance, Gloria --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---