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

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

Comments

Projects
None yet
2 participants
@yurtaev

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

This comment has been minimized.

Show comment
Hide comment
@yurtaev

yurtaev Feb 16, 2012

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

yurtaev commented Feb 16, 2012

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

@mrjoes mrjoes closed this in 637619d Feb 28, 2012

@yurtaev

This comment has been minimized.

Show comment
Hide comment
@yurtaev

yurtaev Feb 28, 2012

Many thanks, I'm idiot =)

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