[SIP Beyond VoIP] Debugging TypeError: __init__() takes exactly 1 argument (2 given)

Saúl Ibarra Corretgé saul at ag-projects.com
Tue Dec 17 20:11:38 CET 2013


Hi Jatson,

On Dec 17, 2013, at 7:26 PM, Jason Ostrom wrote:

> Hi,
> 
> Was hoping to get help debugging this moshimoshi.py script that uses SIP Simple SDK - https://code.google.com/p/moshimoshi/
> 
> The script can now SIP register with the account 'config' created with sip-settings.
> 
> It is supposed to send a call / invite into a conference bridge, but it has the following error, and I see no INVITE in packet capture going outbound from script running:
> 
> "
> File "./moshimoshi.py", line 69, in _NH_SIPApplicationDidStart
>    self.session.connect(self.callee, routes, [AudioStream(account)])
> TypeError:  __init__() takes exactly 1 argument (2 given)
> "
> 
> I don't know where to start in debugging this.  Is this a problem with the arguments passed to self.session.connect?  Because I see three arguments, and I looked at a sample application in sipclients folder, and it uses the same number of arguments with a session.connect method.
> 

The problem is that you are passing the account to AudioStream's constructor, but it no longer accepts it, this should work:

self.session.connect(self.callee, routes, [AudioStream()])


Cheers,

--
Saúl Ibarra Corretgé
AG Projects





More information about the SIPBeyondVoIP mailing list