Re: [Discuss-gnuradio] GRC on OSX?
On Oct 4, 2007, at 12:35 AM, Josh Blum wrote: Basically, the test imports are all things that the Editor uses. gtk, pyxml... and wx for running the flow graphs. I decided on the import tests after many emails of error verbose because something like pyxml was not installed. Thoughts? I'm 100% with you on these import checks. It's easier on the user to hear that such and such module isn't installed instead of getting some whacky Python error that doesn't really help. try: __import__(module) sys.modules.pop(module) #of course, import sys at the top No difference. I also tried just del as well as del sys.modules (module), neither of which worked. I'm using WX 2.8.4 currently, so I'm trying downgrading to 2.6.3 as well as upgrading to 2.8.6. I'm open to any other suggestions as well. - MLD ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
I'm using WX 2.8.4 currently, so I'm trying downgrading to 2.6.3 as well as upgrading to 2.8.6. I'm open to any other suggestions as well. 2.6.3 and 2.8.6 work. So it was something to do with WX 2.8.4. Go figure ... [EMAIL PROTECTED] OSS !} Thanks for all of the help. Now on to the real work. - MLD ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] GRC on OSX?
I'm trying to run ./Editor.py on the latest GRC SVN trunk on OSX 10.4.10 (checked out as of this morning). I've used MacPorts to install python 2.5, python wx, python gtk2, and python xml (along with their dependencies, and all of the GNU Radio dependencies). When I run ./Editor.py, I get: -- cannot import name numbersink2 in Numerical Sink! - continuing... Removing empty category Custom... Welcome to GRC 0.69 Error: Cannot load preferences file: /Users/mlk/.grc.xml Bus error -- I've never used or tried GRC before, so I have no idea what to expect ... but not a bus error. Any ideas or advice for using GRC on OSX? - MLD ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
--- Michael Dickens [EMAIL PROTECTED] wrote: I'm trying to run ./Editor.py on the latest GRC SVN trunk on OSX 10.4.10 (checked out as of this morning). I've used MacPorts to install python 2.5, python wx, python gtk2, and python xml (along with their dependencies, and all of the GNU Radio dependencies). When I run ./Editor.py, I get: -- cannot import name numbersink2 in Numerical Sink! - continuing... Removing empty category Custom... Welcome to GRC 0.69 Error: Cannot load preferences file: /Users/mlk/.grc.xml Bus error I think it is best to address the erors in order. bus error is surprising for an interpreted language but Cannot load preferences file: /Users/mlk/.grc.xml seems like it should be easy to address. My gues the lack of a config file leaves some variables un-intialized which leads to the bus error Chris Albertson Home: 310-376-1029 [EMAIL PROTECTED] Office: 310-336-5189 [EMAIL PROTECTED] KG6OMK Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
1) I suppose numbersink2 is not in your particular gnuradio build. Checkout the trunk again. 2) There is no config file when you first load GRC. When you close GRC, it will create the config file, and the error will be gone thereafter. 3) Bus Error? I have no idea... There are no un-intialized variables. And the code that loads the preferences isnt printing this. It might be a weird GTK+OSX thing. Does GRC function otherwise? -Josh On 10/3/07, Chris Albertson [EMAIL PROTECTED] wrote: --- Michael Dickens [EMAIL PROTECTED] wrote: I'm trying to run ./Editor.py on the latest GRC SVN trunk on OSX 10.4.10 (checked out as of this morning). I've used MacPorts to install python 2.5, python wx, python gtk2, and python xml (along with their dependencies, and all of the GNU Radio dependencies). When I run ./Editor.py, I get: -- cannot import name numbersink2 in Numerical Sink! - continuing... Removing empty category Custom... Welcome to GRC 0.69 Error: Cannot load preferences file: /Users/mlk/.grc.xml Bus error I think it is best to address the erors in order. bus error is surprising for an interpreted language but Cannot load preferences file: /Users/mlk/.grc.xml seems like it should be easy to address. My gues the lack of a config file leaves some variables un-intialized which leads to the bus error Chris Albertson Home: 310-376-1029 [EMAIL PROTECTED] Office: 310-336-5189 [EMAIL PROTECTED] KG6OMK Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
Maybe it's the use of python 2.5? Has anyone (on this list, or if you know someone) ever used GRC on OSX? As I said, I've never tried to until this morning. 1) I suppose numbersink2 is not in your particular gnuradio build. Checkout the trunk again. Done. Nothing changed. 2) There is no config file when you first load GRC. When you close GRC, it will create the config file, and the error will be gone thereafter. OK. I went ahead and did touch ~/.grc.xml, which makes that message go away. No change in execution. 3) Bus Error? I have no idea... There are no un-intialized variables. And the code that loads the preferences isnt printing this. It might be a weird GTK+OSX thing. Does GRC function otherwise? Running gdb comes back with: (gdb) run Editor.py [snip] Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x 0x0024ed8b in PyString_FromString (str=0x0) at Objects/stringobject.c: 108 108 Objects/stringobject.c: No such file or directory. in Objects/stringobject.c (gdb) bt #0 0x0024ed8b in PyString_FromString (str=0x0) at Objects/ stringobject.c:108 #1 0x002b8f84 in PyModule_AddStringConstant (m=0x9030490, name=0x909a8d0 XML_ERROR_UNBOUND_PREFIX, value=0x0) at Python/ modsupport.c:630 #2 0x09092ea3 in initpyexpat () at extensions/pyexpat.c:1977 #3 0x002b40bb in _PyImport_LoadDynamicModule (name=0xbfffaddb xml.parsers.pyexpat, pathname=0xbfffa927 /opt/local/lib/python2.5/ site-packages/_xmlplus/parsers/pyexpat.so, fp=0xa000bea8) at ./ Python/importdl.c:53 #4 0x002b1d9d in load_module (name=0xbfffaddb xml.parsers.pyexpat, fp=0x1b, buf=0xbfffa927 /opt/local/lib/python2.5/site-packages/ _xmlplus/parsers/pyexpat.so, type=3, loader=0x0) at Python/import.c: 1752 #5 0x002b2267 in import_submodule (mod=0x90302f0, subname=0xbfffade7 pyexpat, fullname=0xbfffaddb xml.parsers.pyexpat) at Python/ import.c:2394 #6 0x002b24b5 in load_next (mod=0x90302f0, altmod=0x300aa0, p_name=0xbfffade7, buf=0xbfffaddb xml.parsers.pyexpat, p_buflen=0xbfffb1dc) at Python/import.c:2214 #7 0x002b2962 in import_module_level (name=0x0, globals=0x600120, locals=0x, fromlist=0x9030370, level=-1) at Python/import.c:1995 #8 0x002b2e59 in PyImport_ImportModuleLevel (name=0x9030394 pyexpat, globals=0x90131e0, locals=0x90131e0, fromlist=0x9030370, level=-1) at Python/import.c:2066 #9 0x0028dde3 in builtin___import__ (self=0x0, args=0x902c7e0, kwds=0x0) at Python/bltinmodule.c:47 #10 0x0020e744 in PyObject_Call (func=0xf4b8, arg=0x902c7e0, kw=0x0) at Objects/abstract.c:1860 #11 0x00292a7e in PyEval_CallObjectWithKeywords (func=0xf4b8, arg=0x902c7e0, kw=0x0) at Python/ceval.c:3433 #12 0x00296930 in PyEval_EvalFrameEx (f=0x91183d0, throwflag=0) at Python/ceval.c:2063 #13 0x0029a1a8 in PyEval_EvalCodeEx (co=0x9031188, globals=0x90131e0, locals=0x90131e0, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2831 #14 0x0029a35c in PyEval_EvalCode (co=0x9031188, globals=0x90131e0, locals=0x90131e0) at Python/ceval.c:494 #15 0x002b118a in PyImport_ExecCodeModuleEx (name=0xbfffbf9b xml.parsers.expat, co=0x9031188, pathname=0xbfffb68f /opt/local/ lib/python2.5/site-packages/_xmlplus/parsers/expat.pyc) at Python/ import.c:669 #16 0x002b15e0 in load_source_module (name=0xbfffbf9b xml.parsers.expat, pathname=0xbfffb68f /opt/local/lib/python2.5/ site-packages/_xmlplus/parsers/expat.pyc, fp=0xa000be50) at Python/ import.c:953 #17 0x002b2267 in import_submodule (mod=0x90302f0, subname=0x901ced4 expat, fullname=0xbfffbf9b xml.parsers.expat) at Python/import.c: 2394 #18 0x002b2812 in ensure_fromlist (mod=0x90302f0, fromlist=0x7348af0, buf=0xbfffbf9b xml.parsers.expat, buflen=11, recursive=0) at Python/ import.c:2305 #19 0x002b2be7 in import_module_level (name=0x0, globals=0x90302f0, locals=0x, fromlist=0x7348af0, level=-1) at Python/import.c:2032 #20 0x002b2e59 in PyImport_ImportModuleLevel (name=0x902f50c xml.parsers, globals=0x901b780, locals=0x901b780, fromlist=0x7348af0, level=-1) at Python/import.c:2066 #21 0x0028dde3 in builtin___import__ (self=0x0, args=0x902c780, kwds=0x0) at Python/bltinmodule.c:47 #22 0x0020e744 in PyObject_Call (func=0xf4b8, arg=0x902c780, kw=0x0) at Objects/abstract.c:1860 #23 0x00292a7e in PyEval_CallObjectWithKeywords (func=0xf4b8, arg=0x902c780, kw=0x0) at Python/ceval.c:3433 #24 0x00296930 in PyEval_EvalFrameEx (f=0x9119060, throwflag=0) at Python/ceval.c:2063 #25 0x0029a1a8 in PyEval_EvalCodeEx (co=0x9031140, globals=0x901b780, locals=0x901b780, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2831 #26 0x0029a35c in PyEval_EvalCode (co=0x9031140, globals=0x901b780, locals=0x901b780) at Python/ceval.c:494 #27 0x002b118a in PyImport_ExecCodeModuleEx (name=0xbfffd15b xml.dom.expatbuilder, co=0x9031140, pathname=0xbfffc84f /opt/local/
Re: [Discuss-gnuradio] GRC on OSX?
On 10/3/07, Michael Dickens [EMAIL PROTECTED] wrote: Maybe it's the use of python 2.5? Has anyone (on this list, or if you know someone) ever used GRC on OSX? As I said, I've never tried to until this morning. This really isn't my forte, but a quick search and I saw this page: http://www.rexx.com/~dkuhlman/python_201/python_201.html#SECTION00660 This seems to suggest that there may be a mismatch in what you have installed versus what is running on the system? One thing is looking for those source files where the source no longer comes with it. Running gdb comes back with: (gdb) run Editor.py [snip] Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x 0x0024ed8b in PyString_FromString (str=0x0) at Objects/stringobject.c: 108 108 Objects/stringobject.c: No such file or directory. in Objects/stringobject.c Brian ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
On 10/3/07, Michael Dickens [EMAIL PROTECTED] wrote: Maybe it's the use of python 2.5? I think all of the ubuntu and fedora people have python 2.5. Has anyone (on this list, or if you know someone) ever used GRC on OSX? As I said, I've never tried to until this morning. I have run GRC on a mac mini (x86), and used mac ports for the GNU software. The only issue I had was getting the X server running. Although, It has been a while since... 1) I suppose numbersink2 is not in your particular gnuradio build. Checkout the trunk again. Done. Nothing changed. Maybe you have to make uninstall/rebuild or something, although it may be an issue with the grc block def for number sink, I will check later. At any rate, missing blocks are not a problem. 2) There is no config file when you first load GRC. When you close GRC, it will create the config file, and the error will be gone thereafter. OK. I went ahead and did touch ~/.grc.xml, which makes that message go away. No change in execution. 3) Bus Error? I have no idea... There are no un-intialized variables. And the code that loads the preferences isnt printing this. It might be a weird GTK+OSX thing. Does GRC function otherwise? Running gdb comes back with: (gdb) run Editor.py [snip] Yikes! I cant tell what that may be. -Josh ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
On Wed, Oct 03, 2007 at 03:34:58PM -0400, Michael Dickens wrote: Maybe it's the use of python 2.5? Has anyone (on this list, or if you know someone) ever used GRC on OSX? As I said, I've never tried to until this morning. 1) I suppose numbersink2 is not in your particular gnuradio build. Checkout the trunk again. Done. Nothing changed. 2) There is no config file when you first load GRC. When you close GRC, it will create the config file, and the error will be gone thereafter. OK. I went ahead and did touch ~/.grc.xml, which makes that message go away. No change in execution. 3) Bus Error? I have no idea... There are no un-intialized variables. And the code that loads the preferences isnt printing this. It might be a weird GTK+OSX thing. Does GRC function otherwise? Running gdb comes back with: (gdb) run Editor.py [snip] Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x 0x0024ed8b in PyString_FromString (str=0x0) at Objects/stringobject.c: 108 108 Objects/stringobject.c: No such file or directory. in Objects/stringobject.c (gdb) bt #0 0x0024ed8b in PyString_FromString (str=0x0) at Objects/ stringobject.c:108 #1 0x002b8f84 in PyModule_AddStringConstant (m=0x9030490, name=0x909a8d0 XML_ERROR_UNBOUND_PREFIX, value=0x0) at Python/ modsupport.c:630 #2 0x09092ea3 in initpyexpat () at extensions/pyexpat.c:1977 #3 0x002b40bb in _PyImport_LoadDynamicModule (name=0xbfffaddb xml.parsers.pyexpat, pathname=0xbfffa927 /opt/local/lib/python2.5/ site-packages/_xmlplus/parsers/pyexpat.so, fp=0xa000bea8) at ./ Python/importdl.c:53 #4 0x002b1d9d in load_module (name=0xbfffaddb xml.parsers.pyexpat, fp=0x1b, buf=0xbfffa927 /opt/local/lib/python2.5/site-packages/ _xmlplus/parsers/pyexpat.so, type=3, loader=0x0) at Python/import.c: 1752 In the random stab in the dark department: I wonder if the problem is in pyexpat.c, and whether it was compiled with -O1 optimization on the PPC. (Somebody really ought to create a small test case for the gcc guys and log a bug.) Is there QA code for pyexpat and does it pass (make check?) Eric ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
Michael Dickens wrote: I downloaded grc-0.65 (stable) and grc-0.69 (stable). The former (using Run.py) brings up a window and looks to be working; there are no bus errors. The latter (using Editor.py, and after removing the gtk check) works as well. Both of these were tested using the exact same Python install. Thus the bug seems to be in GRC itself, not in my MacPorts install. - MLD The test import of gtk (in 0.69) was also a problem on a debian system (no bus error, just some import issues). I removed the gtk check from the GRC trunk a week or so ago. In your initial email, you had the bus error, but the test gtk import would not have been present because the trunk was checked out that morning. Can you confirm this, that the trunk still bus errors without the gtk test import? Maybe there is a new error prone thing that has been introduced into GRC between the release of 0.69 and the current trunk. -Josh ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
grc-0.69 does NOT work using ./Editor.py ... I had bypassed the checking incorrectly. My bad. Here is something that might help. In the latest trunk, if I do: --- cd src python from ActionHandler import ActionHandler ActionHandler () --- Then everything works OK. If I try to run ./Editor.py (or python Editor.py), then I get the bus error. Quite strange ... maybe something to do with pre-importing the various modules using __import__ ? ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
I downloaded grc-0.65 (stable) and grc-0.69 (stable). The former (using Run.py) brings up a window and looks to be working; there are no bus errors. The latter (using Editor.py, and after removing the gtk check) works as well. Both of these were tested using the exact same Python install. Thus the bug seems to be in GRC itself, not in my MacPorts install. - MLD ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
Does GRC using WX for anything until running a flow-graph? I assume it's included because of the scopes and such in gr-wxgui? I tried running some of the examples, and they bring up the WX GUI scopes just fine. If I remove 'wx' from the modules check list in Editor.py, then GRC brings up its GUI. Quite strange. If I try: --- python import wx import xml.parsers.pyexpat --- then I get the bus error. Obviously Python has issues with the combined WX and xml.parsers.pyexpat, but I truly know not why. This doesn't happen with any other modules that are used by GRC, at least in my quick checking. Thus I retract my belief that it's a GRC issue ... 0.65 didn't do the import modules check, which is why it works. ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GRC on OSX?
WX is only used with the wxgui stuff. GRC can would function fine without WX, or the wxgui blocks. And flow graphs can be run in a non graphical mode. Basically, the test imports are all things that the Editor uses. gtk, pyxml... and wx for running the flow graphs. I decided on the import tests after many emails of error verbose because something like pyxml was not installed. Thoughts? -- I dont know how to just inspect the python environment to see if a module exists, without importing it (or possibly doing something messy with PYTHONPATH). Perhaps we can still fix this situation by deleting the module from sys.modules after each test import. With the GRC trunk, as is: can you try and change Editor.py and see if it runs: try: __import__(module) --to try: __import__(module) sys.modules.pop(module) #of course, import sys at the top Improvement? -Josh Michael Dickens wrote: Does GRC using WX for anything until running a flow-graph? I assume it's included because of the scopes and such in gr-wxgui? I tried running some of the examples, and they bring up the WX GUI scopes just fine. If I remove 'wx' from the modules check list in Editor.py, then GRC brings up its GUI. Quite strange. If I try: --- python import wx import xml.parsers.pyexpat --- Good lord... then I get the bus error. Obviously Python has issues with the combined WX and xml.parsers.pyexpat, but I truly know not why. This doesn't happen with any other modules that are used by GRC, at least in my quick checking. Thus I retract my belief that it's a GRC issue ... 0.65 didn't do the import modules check, which is why it works. ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio