Hi Jacqueline,
On 02/09/2017 05:07 PM, Jacqueline.Walker wrote: > > > > Hi Marcus, > > > > According to the build/install_manifest.txt it installs to: > > > > /usr/local/lib/python2.7/site-packages/ > > > > And various other /usr/local/ paths as appropriate e.g. > /usr/local/include/ /usr/local/share/ > > > > Does that make sense? > Yep! Thanks! > > > > I followed the instructions – exactly – to use gr_modtool to create a > module, then add a block… I make a build directory and use the cmake, > then make then sudo make install commands as per instructions… > > > > When I had not updated the pythonpath to include the install location > I got the import error. After that was fixed I get the attribute error > of this kind: > > Traceback (most recent call last): > > File "square_floats.py", line 159, in <module> > > main() > > File "square_floats.py", line 147, in main > > tb = top_block_cls() > > File "square_floats.py", line 113, in __init > > self.howto_square2_ff_0 = howto.square2_ff() > > AttributeError: 'module' object has no attribute ‘square_ff’ > > > > which is only fixed by the aforementioned kludge. > > Investigating this showed that it is going to the installed module in > the pythonpath – it’s only when I successfully alter that that it works!! > I think the problem is that python looks into /usr/lib/python2.7/..., but not into /usr/*local*/lib/python2.7/site-packages/ ; maybe you'd want to add that to the pythonpath? You can alternatively use "cmake -DCMAKE_INSTALL_PREFIX=/usr .." to explicitly install into /usr/lib/python2.7/site-packages, but that is probably against all rules of Arch. Best regards, Marcus > > If said file only has for example: > > > > from howto_swig import * > > > > then it will not work but will throw the attribute error. > > > > Regards > > Jacqueline > > > > > > *From:*Marcus Müller [mailto:marcus.muel...@ettus.com] > *Sent:* 09 February 2017 15:51 > *To:* Jacqueline.Walker; discuss-gnuradio@gnu.org > *Subject:* Re: [Discuss-gnuradio] Gr-Inspector Install error > > > > Hi Jacqueline, > > hm, I see! But where *did* you then install your gr-tutorial to, then > (if in doubt, look into build/install_manifest.txt)? Point is that the > *installation target* should be part of your python path, not the > source (/python) nor the build (/build) directories. > > Best regards, > > Marcus > > > > On 02/09/2017 04:48 PM, Jacqueline.Walker wrote: > > Hi Marcus, > > > > I know it’s a kludge but I’ve been working on this steadily when I > can to try and work out why it hasn’t been working despite > following all directions in the tutorials, and so far this is the > only way to get it to work. > > > > It’s how I got the python and C++ blocks in the Guided Tutorials > to work and then I tried again with the square_ff() OOT modules > tutorial thinking it must have been something I did wrong. I fixed > a few other issues I had via that route (I had ‘orphan’ modules in > the GRC) but I still had these runtime errors when I tried to run > the ‘howto’ blocks. > > > > I didn’t use pybombs to install – I haven’t touched pybombs. As > I’m on Arch, I installed everything from the Archlinux packages > using pacman. > > > > Since I’ve been going through this second sequence of tutorials > I’ve had no problems and no error messages with make and make > install! So there’s no hint it’s not going to work until runtime. > > > > I did get an ImportError initially but I fixed that by setting the > PYTHONPATH properly. > > > > Regards > > Jacqueline > > > > > > *From:*Discuss-gnuradio > [mailto:discuss-gnuradio-bounces+jacqueline.walker=ul...@gnu.org] > *On Behalf Of *Marcus Müller > *Sent:* 09 February 2017 15:38 > *To:* discuss-gnuradio@gnu.org <mailto:discuss-gnuradio@gnu.org> > *Subject:* Re: [Discuss-gnuradio] Gr-Inspector Install error > > > > Hi Jacqueline, > > that is not a fix I'd recommend – if this is really just all it > takes to get your module running, than plainly, something has gone > wrong with installing the gr-tutorial module. Did "make install" > work well? Where did things get installed to? Is that installation > target right inside your pybombs prefix? > > Best regards, > > Marcus > > > > On 02/09/2017 04:27 PM, Jacqueline.Walker wrote: > > Hi Tellrell and others, > > > > I have been having similar problems while going through the > various tutorials and have come up with some workarounds (with > help from a python expert – my 21 year old son) and am now > getting to the bottom of it. > > I have fixed it by adding the following lines to the > -_init__.py file and then re-doing the make and make install > steps so that it gets compiled into the site-packages > directories in the PYTHONPATH. > > > > import sys > > sys.path.append("/your-home-path/gr-tutorial/python/") > > sys.path.append("/your-home-path/gr-tutorial/build/") > > sys.path.append("/your-home-path/gr-tutorial/build/swig/") > > > > I suppose I could add these paths to the sys path and that > would fix the problem once and for all. > > > > Regards > > Jacqueline > > > > *From:*Discuss-gnuradio > [mailto:discuss-gnuradio-bounces+jacqueline.walker=ul...@gnu.org] > *On Behalf Of *Ben Hilburn > *Sent:* 09 February 2017 15:14 > *To:* Tellrell White > *Cc:* GNURadio Discussion List > *Subject:* Re: [Discuss-gnuradio] Gr-Inspector Install error > > > > Hi Tellrell - > > > > It looks like your `gr-inspector` OOT module isn't getting > found by GNU Radio. How did you install it? Are you using > PyBOMBS? Are you sure you installed it into the same directory > as GNU Radio? > > > > Cheers, > > Ben > > > > On Tue, Feb 7, 2017 at 3:51 PM, Tellrell White > <t_whit...@yahoo.com <mailto:t_whit...@yahoo.com>> wrote: > > I'm running the live_signal_detection. I replaced the > rtlsdr_source block with a signal source block. When I run the > flowgraph I get > > > > "attributerror: Module object has no attribute > 'signal_detector_cvf" > > > > I tried deleting and reinstalling all the dependencies before > installing gr-inspector but I'm getting the same result. > > > > Regards > > Tellrell White > > > > On Tuesday, February 7, 2017 7:53 AM, Christopher Richardson > <chrisrichardso...@gmail.com > <mailto:chrisrichardso...@gmail.com>> wrote: > > > > Hi Tellrell, > > Which flow graph are you running? > > Cheers > > Chris > > > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org <mailto:Discuss-gnuradio@gnu.org> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > > > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org <mailto:Discuss-gnuradio@gnu.org> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > > > > > > > _______________________________________________ > > Discuss-gnuradio mailing list > > Discuss-gnuradio@gnu.org <mailto:Discuss-gnuradio@gnu.org> > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > > > >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio