Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

«on_event() got multiple values for keyword argument 'name'» #28

Closed
yurtaev opened this issue Feb 16, 2012 · 2 comments
Closed

«on_event() got multiple values for keyword argument 'name'» #28

yurtaev opened this issue Feb 16, 2012 · 2 comments

Comments

@yurtaev
Copy link

yurtaev commented Feb 16, 2012

If key "name" in json data, then:

ERROR:root:on_event() got multiple values for keyword argument 'name'
Traceback (most recent call last):
  File "/Users/yurtaev/PycharmProjects/tornado_bag/tornadio2/session.py", line 404, in raw_message
    ack_response = conn.on_event(event['name'], **str_args)
TypeError: on_event() got multiple values for keyword argument 'name'

because:

def on_event(self, name, _args, *_kwargs):
via. https://github.com/MrJoes/tornadio2/blob/master/tornadio2/conn.py#L154

python

@event
def echo(self, **kwargs):
    return kwargs

javascript

conn.emit("echo", {name:"test"}, function(data){console.dir(data)})
@yurtaev
Copy link
Author

yurtaev commented Feb 16, 2012

I don't know how to fix it
yurtaev@72e6b05

@mrjoes mrjoes closed this as completed in 637619d Feb 28, 2012
@yurtaev
Copy link
Author

yurtaev commented Feb 28, 2012

Many thanks, I'm idiot =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants