[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] usrp_nbfm_ptt.py Error: __init__() takes exactly
Re: [Discuss-gnuradio] usrp_nbfm_ptt.py Error: __init__() takes exactly 4 arguments (6 given)
Fri, 23 Mar 2012 13:55:26 -0700
I'm pretty sure this will fix it.
replace line 372:
def __init__(self, args, gain, audio_output):
def __init__(self, args, spec, antenna, gain, audio_output):
On Fri, Mar 23, 2012 at 1:23 PM, Ben Reynwar <address@hidden> wrote:
> On Fri, Mar 23, 2012 at 11:30 AM, mario behn <address@hidden> wrote:
>> On Fri, Mar 23, 2012 at 5:50 PM, Ben Reynwar <address@hidden> wrote:
>>> That sounds like the example is out-of-date. It's calling some
>>> function that expects a different number of arguments than it is
>>> giving it. If you included the entire error output then we could
>>> better see what the problem was (i.e. which function is raising this
>> Hi Ben,
>> thank you for your answer. I agree, here is the total text of the
>> error, eric4 gives me:
>> The debugged program raised the exception unhandled TypeError
>> "__init__() takes exactly 4 arguments (6 given)"
>> File: /home/usrp1/USRP/gnuradio/gr-uhd/examples/usrp_nbfm_ptt.py, Line: 81
>> and highlights line 81 correspondingly:
>> 76 self.txpath = transmit_path(options.args, options.spec,
>> 77 options.antenna, options.tx_gain,
>> 78 options.audio_input)
>> 79 self.rxpath = receive_path(options.args, options.spec,
>> 80 options.antenna, options.rx_gain,
>> 81 options.audio_output)
>> 82 self.connect(self.txpath)
>> 83 self.connect(self.rxpath)
>> and it is actually the file available here:
>> Is there any quick fix I can apply?
>> Mario Behn
> Yep, there is an error in that file. The receive_path defined on line
> 371 isn't compatible with the call to receive_path on line 79.
> Perhaps try removing options.spec and options.antenna from the call,
> but I'm just guessing, I haven't used this example before.