discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ImportError


From: Mario Moran
Subject: Re: ImportError
Date: Tue, 2 Nov 2021 13:17:58 -0600

Thank you for being fine with all my questions, I do have a lot. So I followed the purge command and got rid of files. Then I also used the sudo chown command to fix that permission problem. I had to use it again to make install and I was then able to make install. So I had to recreate my flowgraph and run it. It is not working but it is a different error now. Here it is:
Traceback (most recent call last):
  File "/home/mariom/gr-tutorial/build/top_block.py", line 191, in <module>
    main()
  File "/home/mariom/gr-tutorial/build/top_block.py", line 167, in main
    tb = top_block_cls()
  File "/home/mariom/gr-tutorial/build/top_block.py", line 130, in __init__
    self.digital_chunks_to_symbols_xx_0 = digital.chunks_to_symbols_bc(1+1j, 1-1j, -1+1j, -1-1j, 1)
TypeError: make() takes from 1 to 2 positional arguments but 5 were given

I have my block, Chunks to Symbols, set up like this:
inputtype: byte
Output type: complex
symbol table: 1+1j, 1-1j, -1+1j, -1-1j
dimensions: 1
num ports 1

From the tutorial the flowgraph, Here, it seems that the imaginary numbers are represented as 'j's instead of 'i's so I used 'j's was that correct or may I be missing a factor to make it work?   

On Tue, Nov 2, 2021 at 4:28 AM Vasil Velichkov <vvvelichkov@gmail.com> wrote:
Hi Mario,

On 01/11/2021 21.57, Mario Moran wrote:
> For the command, 'dpkg -l | grep gnuradio' here is the output:
>
> rc  gnuradio                                   3.8.3.1-0~gnuradio~focal-4
>          amd64        GNU Radio Software Radio Toolkit

The `rc` here means - removed, config files are installed. To remove the config files you need to run either `sudo apt-get remove --purge gnuradio` or `sudo apt-get purge gnuradio`

> ii  libgnuradio-pmt3.8.1:amd64                 3.8.1.0~rc1-2build2
>           amd64        gnuradio pmt container library
> ii  libgnuradio-pmt3.8.3:amd64                 3.8.3.1-0~gnuradio~focal-4
>          amd64        gnuradio pmt container library3.8.3.1-0~gnuradio~focal-4
> .....

You also have two versions of the various libgnuradio-* packages - 3.8.1 and 3.8.3. Although not strictly necessary my advice is it remove them all. After removing libgnuradio-pmt all other should be removed automatically, but if not list them explicitly

   apt-get purge libgnuradio-pmt3.8.1 libgnuradio-pmt3.8.3

> So I used the command ' find /usr -name *gnuradio*' and there was none

Strange! You need to put double quotes around the regex

   find /usr -name "*gnuradio*"

> there so I followed your instructions and removed the directory and
> recreated it and installed it. There was an error with the cmake, it said:
> CMake Error at cmake_install.cmake:41 (file):
>   file INSTALL cannot set permissions on
>   "/home/mariom/prefix-3.8/lib/cmake/tutorial/tutorialConfig.cmake":
>   Operation not permitted.

At some point you've used sudo to install. To fix the ownership run

  sudo chown --recursive mariom:mariom /home/mariom/prefix-3.8/

> So I used sudo make install instead and it completed it without fail.

Don't use sudo when installing in your $HOME, it is not necessary.

> The reason why I had to was when I was trying to figure out how to fix this
> I thought maybe the prefix was incorrect so I find Gnuradio that was not
> installed pybombs and used the command of cmake but instead of prefix.3.8 I
> placed 3.8.3.1. Would it be ok to remove that one

Yes, you can just delete the whole directory.

> or would that correct problems?

It won't solve current problems but most probably would prevent problems in the future.

> I start gnuradio companion through the terminal using this:
>
> source ~/prefix-3.8/setup_env.sh
> gnuradio-companion

Does it work now and if not what error do you get? If you still get some errors then first remove all libgnuradio packages, all leftovers, then do a clean rebuild/reinstall, run your flowgraph and provide the full output.

> Thank you for all of your help so far in this. Sorry for all of the
> questions I have.

You are welcome! It is more then normal to have a lot of questions and there is nothing to be sorry about. Keep exploring and someday pay it forward by helping other new users.

Regards,
Vasil

reply via email to

[Prev in Thread] Current Thread [Next in Thread]