flashingpumpkin/django-socialregistration — Issue #125: AssertionError: Signal receivers must accept keyword arguments (**kwargs).
Author: zvictor
Created: 2011-11-05 22:06:38+00:00
State: open

I had followed the docs to connect signals, as follow:

```python
from socialregistration import signals
from socialregistration.contrib.facebook.models import FacebookProfile

def connect_handler(sender, user, profile, client, request = None):
data = client.graph.request('me')

signals.connect.connect(connect_handler, sender = FacebookProfile,
dispatch_uid = 'facebook.connect')
```
then:

```python
Traceback (most recent call last):
File "./manage.py", line 11, in
execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 209, in execute
translation.activate('en-us')
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/__init__.py", line 100, in activate
return _trans.activate(language)
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 202, in activate
_active.value = translation(language)
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 185, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 162, in _fetch
app = import_module(appname)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/zvictor/Development/marcajogo/Kevlar/diamond/__init__.py", line 1, in
import overrides
File "/home/zvictor/Development/marcajogo/Kevlar/diamond/overrides.py", line 10, in
from diamond.models import Perfil
File "/home/zvictor/Development/marcajogo/Kevlar/diamond/models.py", line 203, in
def autoProfile(sender, user, profile, client, request = None):
File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 268, in _decorator
signal.connect(func, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 92, in connect
"Signal receivers must accept keyword arguments (**kwargs)."
AssertionError: Signal receivers must accept keyword arguments (**kwargs).
```

I guess there is missing **kwargs parameter in the docs. I changed my code, and worked, as follow:

```python
@receiver(signals.connect, sender = FacebookProfile, dispatch_uid = 'facebook.connect')
def connect_handler(sender, user, profile, client, request = None, **kwargs):
data = client.graph.request('me')
```