Forum: GNU Radio USRP2 AttributeError: 'usr p2_source_32fc_sptr' object has no attribute 'ad c_rate'¨

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Catalin LACATUS (Guest)
on 2008-11-07 17:35
(Received via mailing list)
Hello,

I tried to run usrp2_fft.py to test my USRP2 board and I got the
following error.
¨AttributeError: 'usrp2_source_32fc_sptr' object has no attribute
'adc_rate'¨

./find-usrps script is running fine with following result.
00:50:c2:85:30:0a hw_rev = 0x0300

My configuration is
-Ubuntu 8.04, with the latest svn (7 days old)
- I am using Netgear Gigabit switch to connect to fast Ethernet port on
my laptop. I could not directly connect my Gigabit PCMCIA card to USRP2.

Do you think this error is due to any configuration setting?

Thank you,
-C

-----------------------------------------------------------------
./usrp2_fft.py -f 400M
Traceback (most recent call last):
  File "./usrp2_fft.py", line 267, in <module>
    main ()
  File "./usrp2_fft.py", line 263, in main
    app = stdgui2.stdapp(app_top_block, "USRP2 FFT", nstatus=1)
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
36, in __init__
    wx.App.__init__ (self, redirect=False)
  File
"/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
7836, in __init__
    self._BootstrapApp()
  File
"/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
7433, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
39, in OnInit
    frame = stdframe (self.top_block_maker, self.title, self._nstatus)
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
60, in __init__
    self.panel = stdpanel (self, self, top_block_maker)
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
81, in __init__
    self.top_block = top_block_maker (frame, self, vbox, sys.argv)
  File "./usrp2_fft.py", line 71, in __init__
    input_rate = self.u.adc_rate() / self.u.decim()
    AttributeError: 'usrp2_source_32fc_sptr' object has no attribute
'adc_rate'
Newman, Timothy (Guest)
on 2008-11-07 18:03
(Received via mailing list)
The usrp2_fft python code was recently changed to use that adc_rate()
call, although the actual implementation returns the value to the input
pointer parameter.



Just change that line in usrp2_fft back to what it was so you can at
least test it:



From:

input_rate = self.u.adc_rate() / self.u.decim()



To:

input_rate = 100e6/options.decim





This simply a quick fix, I'm assuming the adc_rate function will be
changed to return the value the same way as decim() does.





-------------------------------------------

Timothy R. Newman

DNI Post Doctoral Fellow

Wireless @ Virginia Tech

447 Durham Hall

Blacksburg, VA 24061

Phone: 540-231-2041



From: discuss-gnuradio-bounces+trnewman=removed_email_address@domain.invalid
[mailto:discuss-gnuradio-bounces+trnewman=removed_email_address@domain.invalid] 
On Behalf Of
Catalin LACATUS
Sent: Friday, November 07, 2008 10:35 AM
To: removed_email_address@domain.invalid
Subject: [Discuss-gnuradio] USRP2 AttributeError:
'usrp2_source_32fc_sptr' object has no attribute 'adc_rate'¨



Hello,

I tried to run usrp2_fft.py to test my USRP2 board and I got the
following error.
¨AttributeError: 'usrp2_source_32fc_sptr' object has no attribute
'adc_rate'¨

./find-usrps script is running fine with following result.
00:50:c2:85:30:0a hw_rev = 0x0300

My configuration is
-Ubuntu 8.04, with the latest svn (7 days old)
- I am using Netgear Gigabit switch to connect to fast Ethernet port on
my laptop. I could not directly connect my Gigabit PCMCIA card to USRP2.

Do you think this error is due to any configuration setting?

Thank you,
-C

-----------------------------------------------------------------
./usrp2_fft.py -f 400M
Traceback (most recent call last):
  File "./usrp2_fft.py", line 267, in <module>
    main ()
  File "./usrp2_fft.py", line 263, in main
    app = stdgui2.stdapp(app_top_block, "USRP2 FFT", nstatus=1)
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
36, in __init__
    wx.App.__init__ (self, redirect=False)
  File
"/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
7836, in __init__
    self._BootstrapApp()
  File
"/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
7433, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
39, in OnInit
    frame = stdframe (self.top_block_maker, self.title, self._nstatus)
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
60, in __init__
    self.panel = stdpanel (self, self, top_block_maker)
  File
"/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py", line
81, in __init__
    self.top_block = top_block_maker (frame, self, vbox, sys.argv)
  File "./usrp2_fft.py", line 71, in __init__
    input_rate = self.u.adc_rate() / self.u.decim()
    AttributeError: 'usrp2_source_32fc_sptr' object has no attribute
'adc_rate'
This topic is locked and can not be replied to.