Forum: GNU Radio error in fm_tx4(fm transmitter) example

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.
Tushar P. (Guest)
on 2009-04-25 09:45
(Received via mailing list)
I try to run the fm transmitter example in the gnu example directory

I got the error like
"AttributeError: 'db_basic_tx' object has no attribute 'which'"

I gave the following command,

[root@tkp usrp]# python fm_tx4.py --tx-subdev-spec=A --freq=100M
--nchannels=1

I got the following comments
Using TX d'board A: Basic Tx
Traceback (most recent call last):
  File "fm_tx4.py", line 197, in <module>
    main ()
  File "fm_tx4.py", line 193, in main
    app = stdgui2.stdapp(fm_tx_block, "Multichannel FM Tx", nstatus=1)
  File "/usr/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 7935, in __init__
    self._BootstrapApp()
  File
"/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7509, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/usr/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/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py",
line
60, in __init__
    self.panel = stdpanel (self, self, top_block_maker)
  File "/usr/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 "fm_tx4.py", line 127, in __init__
    if not self.set_freq(options.freq):
  File "fm_tx4.py", line 180, in set_freq
    r = self.u.tune(self.subdev.which(), self.subdev, target_freq)
AttributeError: 'db_basic_tx' object has no attribute 'which'


I used the basic transmitter board.

please guide me

thanks and regards
tushar patel
Johnathan C. (Guest)
on 2009-04-25 09:54
(Received via mailing list)
On Fri, 2009-04-24 at 22:44 -0700, Tushar P. wrote:

> I try to run the fm transmitter example in the gnu example directory
>
> I got the error like
> "AttributeError: 'db_basic_tx' object has no attribute 'which'"

Is it possible you have mixture of two different versions of GNU Radio
on your system?  The fm_tx4.py script is using the 3.2 daughterboard
API, which has the which() function call, but older versions of GNU
Radio lack that.

Johnathan
Tushar P. (Guest)
on 2009-04-26 11:05
(Received via mailing list)
Thanks Johnathan,
Previous I used the gnu radio 3.1.3 version,
But Now I am using the GNU Radio 3.2 version with GRC which contain the
latest OFDM implementation etc.

But Still I found same error
So If you have any Idea can u guide me further

thanks and regards
tushar
On Fri, Apr 24, 2009 at 10:53 PM, Johnathan C. <
Johnathan C. (Guest)
on 2009-04-27 08:28
(Received via mailing list)
On Sun, Apr 26, 2009 at 12:03 AM, Tushar P. 
<removed_email_address@domain.invalid>
wrote:

> Previous I used the gnu radio 3.1.3 version,
> But Now I am using the GNU Radio 3.2 version with GRC which contain the
> latest OFDM implementation etc.

It looks like the old 3.1.3 version is still being found.  Did you
uninstall 3.1.3 before installing 3.2?

Johnathan
Tushar P. (Guest)
on 2009-04-27 10:37
(Received via mailing list)
No, I did not make any uninstallation,
I was under impression that new version  will install on previous one.
If it is not so, then please guide me how to make uninstallation of
previous
version,
as I build GNURadio 3.2 , it build on same directory like
/usr/local/share/gnuradio
so how can i uninstall it?
please guide me

thanks and regards
tushar patel

On Sun, Apr 26, 2009 at 9:26 PM, Johnathan C. <
Johnathan C. (Guest)
on 2009-04-27 18:48
(Received via mailing list)
On Sun, Apr 26, 2009 at 11:33 PM, Tushar P. 
<removed_email_address@domain.invalid>
wrote:

> No, I did not make any uninstallation,
> I was under impression that new versionĀ  will install on previous one.
> If it is not so, then please guide me how to make uninstallation of previous
> version,
> as I build GNURadio 3.2 , it build on same directory like
> /usr/local/share/gnuradio
> so how can i uninstall it?
> please guide me

The way to uninstall GNU Radio is to run 'make uninstall' from the
source code directory you built and installed it from.  However, you
may not have that lying around.  You could rebuild the 3.1.3 source
tree (bootstrap, ./configure steps only), then run 'make uninstall'.

Otherwise, you will need to search through /usr/local/ to file the
relevant GNU Radio files and manually delete them.

Johnathan
Tushar P. (Guest)
on 2009-04-29 03:36
(Received via mailing list)
I made the uninstall from its source directory, from where I configure
the
gnuradio 3.1.3.a
But after that I do not able to fine the fm_tx4.py example in
/usr/local/share/gnuradio/examples/usrp directory.

So I do the ./bootstrap, configure and make && make check && make
install
from the gnuradio 3.2 source.
eventhough i do not get any example in
/usr/local/share/gnuradio/examples/usrp,
so I did "make install" from gnuradio 3.2/gnuradio-examples directory.
then
all usrp example build in
/usr/local/share/gnuradio/examples/usrp directory.
 But after that I run the same command for fm_tx4.py

 [root@tkp usrp]# python fm_tx4.py -T A -f 100M

But i got the same error.
I did two times but same I do not able to figure out what is the
problem.
please guide me.
paste the o/p of fm_tx example


Using TX d'board A: Basic Tx
Traceback (most recent call last):
  File "fm_tx4.py", line 197, in <module>
    main ()
  File "fm_tx4.py", line 193, in main
    app = stdgui2.stdapp(fm_tx_block, "Multichannel FM Tx", nstatus=1)
  File "/usr/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 7935, in __init__
    self._BootstrapApp()
  File
"/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7509, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/usr/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/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py",
line
60, in __init__
    self.panel = stdpanel (self, self, top_block_maker)
  File "/usr/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 "fm_tx4.py", line 127, in __init__
    if not self.set_freq(options.freq):
  File "fm_tx4.py", line 180, in set_freq
    r = self.u.tune(self.subdev.which(), self.subdev, target_freq)
AttributeError: 'db_basic_tx' object has no attribute 'which'




On Mon, Apr 27, 2009 at 7:42 AM, Johnathan C. <
This topic is locked and can not be replied to.