I'm new to GNURadio and OP25, and am facing the above error when trying to run audio_p25_rx.py.
How I installed: On Ubuntu 10.04, I installed GNURadio 3.6, ensured that the prerequisites on the BeginnersBuild page were installed, then installed and built OP25, the imbe_vocoder, and then the repeater as instructed on the BuildInstructions page. Also installed gr-fsk4. I had put in the following symlink to get over some gruel problems while trying to build gr-fsk4: $ln -s /usr/local/include/gruel/swig/gruel_common.i /usr/local/include/gnuradio/swig/gruel_common.i
Now I am stuck with the msgq error.
I'd like to know if the build is expected to work with gnuradio 3.6. and whether audio_p25_rx.py can be executed without any input, just to make sure the OP25 build works. (I understand that in gnuradio 3.6 the usrpm folder has been deprecated and that seems to be giving rise to other Not Found errors for other scripts...)
Any help will be greatly appreciated. Don't mind going to Gnuradio 3.2.2 if that will make life simpler.
Thanks - Ram
could you please paste the entire backtrace
Max
________________________________ From: rajani_38 ramkumar.ramaswamy@gmail.com To: op25-dev@yahoogroups.com Sent: Friday, August 24, 2012 10:08 AM Subject: [op25-dev] "NameError: global name 'msgq' is not defined" in audio_p25_rx.py
I'm new to GNURadio and OP25, and am facing the above error when trying to run audio_p25_rx.py.
How I installed: On Ubuntu 10.04, I installed GNURadio 3.6, ensured that the prerequisites on the BeginnersBuild page were installed, then installed and built OP25, the imbe_vocoder, and then the repeater as instructed on the BuildInstructions page. Also installed gr-fsk4. I had put in the following symlink to get over some gruel problems while trying to build gr-fsk4: $ln -s /usr/local/include/gruel/swig/gruel_common.i /usr/local/include/gnuradio/swig/gruel_common.i
Now I am stuck with the msgq error.
I'd like to know if the build is expected to work with gnuradio 3.6. and whether audio_p25_rx.py can be executed without any input, just to make sure the OP25 build works. (I understand that in gnuradio 3.6 the usrpm folder has been deprecated and that seems to be giving rise to other Not Found errors for other scripts...)
Any help will be greatly appreciated. Don't mind going to Gnuradio 3.2.2 if that will make life simpler.
Thanks - Ram
Here you go Max - thanks for offering to look at it.
************************ rr@Pinky:~/SoftwareAndApps/op25/python$ ./audio_p25_rx.py -a Using Volk machine: ssse3_32 Traceback (most recent call last): File "./audio_p25_rx.py", line 1044, in <module> app = stdgui2.stdapp(p25_rx_block, "APCO P25 Receiver", 3) File "/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py", line 38, in __init__ wx.App.__init__ (self, redirect=False) File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7978, in __init__ self._BootstrapApp() File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7552, in _BootstrapApp return _core_.PyApp__BootstrapApp(*args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py", line 42, in OnInit self._max_noutput_items) File "/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py", line 64, in __init__ self.panel = stdpanel (self, self, top_block_maker, max_nouts) File "/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py", line 86, in __init__ self.top_block = top_block_maker (frame, self, vbox, sys.argv) File "./audio_p25_rx.py", line 97, in __init__ self.__init_gui(frame, panel, vbox) File "./audio_p25_rx.py", line 303, in __init_gui self.p25_decoder.set_msgq(msgq) NameError: global name 'msgq' is not defined rr@Pinky:~/SoftwareAndApps/op25/python$ ^C rr@Pinky:~/SoftwareAndApps/op25/python$
***************************************
--- In op25-dev@yahoogroups.com, ikjtel <ikj1234i@...> wrote:
could you please paste the entire backtrace
Max
in line number 303 try editing the .py file and changing the value that's inside the parentheses - try changing it from 'msgq' to 'self.msgq'
Max
________________________________ From: rajani_38 ramkumar.ramaswamy@gmail.com To: op25-dev@yahoogroups.com Sent: Friday, August 24, 2012 10:39 AM Subject: [op25-dev] Re: "NameError: global name 'msgq' is not defined" in audio_p25_rx.py
Here you go Max - thanks for offering to look at it.
************************ rr@Pinky:~/SoftwareAndApps/op25/python$ ./audio_p25_rx.py -a Using Volk machine: ssse3_32 Traceback (most recent call last): File "./audio_p25_rx.py", line 1044, in <module> app = stdgui2.stdapp(p25_rx_block, "APCO P25 Receiver", 3) File "/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py", line 38, in __init__ wx.App.__init__ (self, redirect=False) File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7978, in __init__ self._BootstrapApp() File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7552, in _BootstrapApp return _core_.PyApp__BootstrapApp(*args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py", line 42, in OnInit self._max_noutput_items) File "/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py", line 64, in __init__ self.panel = stdpanel (self, self, top_block_maker, max_nouts) File "/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py", line 86, in __init__ self.top_block = top_block_maker (frame, self, vbox, sys.argv) File "./audio_p25_rx.py", line 97, in __init__ self.__init_gui(frame, panel, vbox) File "./audio_p25_rx.py", line 303, in __init_gui self.p25_decoder.set_msgq(msgq) NameError: global name 'msgq' is not defined rr@Pinky:~/SoftwareAndApps/op25/python$ ^C rr@Pinky:~/SoftwareAndApps/op25/python$
***************************************
--- In op25-dev@yahoogroups.com, ikjtel <ikj1234i@...> wrote:
could you please paste the entire backtrace
Max
I have the same error in usrp_p25_rx.py, and it occurs in the same segment of code - the one that sets up the decoder. In audio_p25_rx.py changing 'msgq' to 'self.msgq' worked in that it brought up the windows successfully. However, I'm not sure if this the best way to fix it permanently because (i) I would have to do it all over the place and deviate from the most recent codebase just to get it to run (ii) a couple of others have pointed this exact same error in 2012 and 2011 and it seems to have been resolved without changing the codebase.
Further, there are some deeper issues- for example, module usrpm cannot be found since the usrpm folder has been deprecated in gnuradio 3.6. So I really need to know if I am staring at a deeper issues in terms of needing to install gnuradio 3.2 rather than 3.6
rr@Pinky:~/SoftwareAndApps/op25/repeater/src/python$ ./scope.py Traceback (most recent call last): File "./scope.py", line 46, in <module> from usrpm import usrp_dbid ImportError: No module named usrpm
Any help would be appreciated.
Thanks - Ram
--- In op25-dev@yahoogroups.com, ikjtel <ikj1234i@...> wrote:
in line number 303 try editing the .py file and changing the value that's inside the parentheses - try changing it from 'msgq' to 'self.msgq'
Max
ImportError: No module named usrpm
Yeah, none (AFAIK) of our code has been updated to use the new UHD interface in GR. Sound-card users can just comment-out the 'usrp' import statements (such as this one) but USRP users must use the older GR versions until we update the code...
Max
Thanks Max, that's very helpful input. What about the global msgq variable error? Is it a typo that whoever downloads the code must fix manually in line 303 of audio_p25_rx.py? Or is it again just due to the usage of gnuradio 3.6 rather than gnuradio 3.2? Best -Ram
--- In op25-dev@yahoogroups.com, ikjtel <ikj1234i@...> wrote:
ImportError: No module named usrpm
Yeah, none (AFAIK) of our code has been updated to use the new UHD interface in GR. Sound-card users can just comment-out the 'usrp' import statements (such as this one) but USRP users must use the older GR versions until we update the code...
Max
--- In op25-dev@yahoogroups.com, "rajani_38" <ramkumar.ramaswamy@...> wrote:
Thanks Max, that's very helpful input. What about the global msgq variable error? Is it a typo that whoever downloads the code must fix manually in line 303 of audio_p25_rx.py?
It's just a typo - I've just pushed a fix. If there are other places where this same error exists, kindly point them out...
Thanks for reporting this obvious typographical bug
Max
Yeah, unfortunately none of the code works with UHD based devices.
The current GNUradio trunk has already dropped support for the legacy USRP1 drivers, so effectively our code requires the older versions of GNUradio.
--- In op25-dev@yahoogroups.com, ikjtel <ikj1234i@...> wrote:
ImportError: No module named usrpm
Yeah, none (AFAIK) of our code has been updated to use the new UHD interface in GR. Sound-card users can just comment-out the 'usrp' import statements (such as this one) but USRP users must use the older GR versions until we update the code...
Max
Thanks for the confirmation on that. OK, so I decided to remove gnuradio 3.6 and install gnuradio 3.2.2 instead since the source for my experiments will in fact be a USRP. I also added the line "msgq = gr.msg_queue(2)" in usrp_p25_rx and audio_p25_rx files to allow them to run without error which they now do.
However for now I am constrained to getting sample files from the USRP. So I tried opening the sample files referred to in the DecoderPage from the usrp_p25_rx dialog, but it asks for a .dat.info file as well...
-Ram
--- In op25-dev@yahoogroups.com, "Matt" <matt.robert80@...> wrote:
Yeah, unfortunately none of the code works with UHD based devices.
The current GNUradio trunk has already dropped support for the legacy USRP1 drivers, so effectively our code requires the older versions of GNUradio.
(Sorry I posted an incomplete message - deleting and reposting).
Thanks for the confirmation on that. OK, so I decided to remove gnuradio 3.6 and install gnuradio 3.2.2 instead since the source for my experiments will in fact be a USRP (which I don't own :-(). I also added the line "msgq = gr.msg_queue(2)" in usrp_p25_rx and audio_p25_rx files to allow them to run without error which they now do.
Now for the next stupid question :-P.
However for now I am constrained to getting sample files from the USRP. So I tried opening the sample files referred to in the DecoderPage from the usrp_p25_rx dialog, but it asks for a .dat.info file as well. Searched the repository and got the .dat/.info pairs, but not able to open them; just get an error saying "Cannot open capture file '<'". What is the right way to open USRP sample files?
-Ram
--- In op25-dev@yahoogroups.com, "Matt" <matt.robert80@...> wrote:
Yeah, unfortunately none of the code works with UHD based devices.
The current GNUradio trunk has already dropped support for the legacy USRP1
drivers, so effectively our code requires the older versions of GNUradio.
I'll take a look at getting a UHD version of the code sorted ASAP. I'm using a USRP2 with WBX most of the time but only recently switched to UHD so it is actually on my list for when I return home (am currently overseas).