Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import dvbgse error #3

Open
F4HSL-Yves opened this issue Oct 8, 2021 · 14 comments
Open

import dvbgse error #3

F4HSL-Yves opened this issue Oct 8, 2021 · 14 comments

Comments

@F4HSL-Yves
Copy link

Hy, when i try to test the new blocks from dvb-gse i get : ModuleNotFoundError: No module named 'dvbgse'
any advices?
i have installed all things as you wrote.
Regards

@drmpeg
Copy link
Owner

drmpeg commented Oct 9, 2021

You have to install into the same directory you've installed GNU Radio. You can find that with gnuradio-config-info --prefix.

For example, if you installed with apt, then the prefix will be /usr. To install gr-dvbgse (or any other OOT), you would use cmake -DCMAKE_INSTALL_PREFIX=/usr ../ when you build.

If you installed from a GNU Radio PPA, then gnuradio-config-info --prefix may return /. That's a bug. The correct prefix is /usr.

@F4HSL-Yves
Copy link
Author

Hello Ron, seems there is a path problem, the install put dvbgse and dvbs2rx in /usr/local/lib/python3/dist-packages/, but pythonpath does not contain this path, it contains /usr/local/lib/python3.8/dist-packages/, so i moved the two packages in this latter directory, and i don't get import not found any more.

But when i launch your graph (either dvbgse or dvbsrx) i get an error :

import dvbgse
File "/usr/local/lib/python3.8/dist-packages/dvbgse/init.py", line 18, in
from .dvbgse_python import *
ImportError: generic_type: type "bbheader_source" referenced unknown base type "gr::sync_block"

same for dvbsrx :

import dvbs2rx
File "/usr/local/lib/python3.8/dist-packages/dvbs2rx/init.py", line 22, in
from .dvbs2rx_python import *
ImportError: generic_type: type "bbdeheader_bb" referenced unknown base type "gr::block"

i tried to update pybind11-dev (as i have read on a forum) and rebuild but no success....

Thanks for help

@drmpeg
Copy link
Owner

drmpeg commented Oct 9, 2021

Make sure your GNU Radio install is in /usr/local as I outlined above.

I believe it would have been better to just add to your PYTHONPATH.

export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3/dist-packages

The Python path thing is pretty messy. There's a patch pending to straighten it out, but I'm not sure that everyone agrees on it yet.

gnuradio/gnuradio#5148

@F4HSL-Yves
Copy link
Author

OK, so to get clear i removed gnuradio with
sudo apt-get remove --auto-remove gnuradio
then i reinstalled gnu-radio with :
sudo apt-get update
sudo apt-get install gnuradio
then i rebuild with
cmake -DCMAKE_INSTALL_PREFIX=/usr ../
all seems installed in /usr/lib/python3/dist-packages
when i launch your graph, the module is found but still errors :

import dvbs2rx
File "/usr/local/lib/python3.8/dist-packages/dvbs2rx/init.py", line 22, in
from .dvbs2rx_python import *
ImportError: generic_type: type "bbdeheader_bb" referenced unknown base type "gr::block"

idem for dvbgse module

really difficult....
Thanks for help
Yves
Ps: my versions:
fresh installation Ubuntu 20.04.3 LTS
fresh installation (via apt install) gnuradio v3.10-compat-xxx-xunknown (Python 3.8.10)

@drmpeg
Copy link
Owner

drmpeg commented Oct 10, 2021

You have to delete what's in /usr/local/lib/python3.8/dist-packages/.

You may want to clean out all GNU Radio related files in /usr/local for good measure.

@F4HSL-Yves
Copy link
Author

Ok on, sorry to bother you, i have deleted the content of all dir in /user/local/lib
i have the same errors
Pybind11 problem ? Compilation problem ?
i am so eager to test your software !!
Thanks for help
Yves

@drmpeg
Copy link
Owner

drmpeg commented Oct 10, 2021

What is the exact error you're getting now? If you deleted /usr/local/lib/python3.8/dist-packages/*, it can't be exactly the same.

@F4HSL-Yves
Copy link
Author

Ok Ron : here is what i get in the gnu console when i start the graph :

Generating: '/home/yves/gr-dvbs2rx/apps/dvbs2_rx.py'

Executing: /usr/bin/python3 -u /home/yves/gr-dvbs2rx/apps/dvbs2_rx.py

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/dvbs2rx/init.py", line 18, in
from .dvbs2rx_python import *
ImportError: generic_type: type "bbdeheader_bb" referenced unknown base type "gr::block"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/yves/gr-dvbs2rx/apps/dvbs2_rx.py", line 40, in
import dvbs2rx
File "/usr/lib/python3/dist-packages/dvbs2rx/init.py", line 22, in
from .dvbs2rx_python import *
ImportError: generic_type: type "bbdeheader_bb" referenced unknown base type "gr::block"

Done (return code 1)

@drmpeg
Copy link
Owner

drmpeg commented Oct 10, 2021

Looks to be a pybind11 issue. See https://www.mail-archive.com/discuss-gnuradio@gnu.org/msg73247.html

@F4HSL-Yves
Copy link
Author

i have seen that post before, i have already done the apt update pybind-dev, and i have now the v2.4.3 on my system :

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
pybind11-dev est déjà la version la plus récente (2.4.3-2build2).
Calcul de la mise à jour... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.

I did the build of your modules with that version. Is it the right one ?

Regards
Yves

@drmpeg
Copy link
Owner

drmpeg commented Oct 10, 2021

I think you really need pybind11 v2.5.0. I don't see how apt upgrade pybind11-dev could work as suggested in the e-mail. When I do that, it just says pybind11-dev is already the newest version (2.4.3-2build2)..

It seems you'll have to build pybind11 from source.

sudo apt-get purge pybind11-dev

git clone https://github.com/pybind/pybind11.git

cd pybind11

git checkout v2.5.0 -b tmp

mkdir build

cd build

cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF ../

make

sudo make install

sudo ldconfig

@F4HSL-Yves
Copy link
Author

Ok thanks Ron, I will try that. So after I have to rebuild your modules ? Should I delete the old ones or something else ?

@drmpeg
Copy link
Owner

drmpeg commented Oct 10, 2021

You should clean the build directory of the projects before rebuilding them. For example:

cd gr-dvbgse/build

rm -rf *

Make sure you're in the correct directory before issuing rm -rf *!

You shouldn't have to worry about anything in /usr/lib. The new build will update those files.

@F4HSL-Yves
Copy link
Author

Done, much better now :-) no more import errors ! now i need to understand how it works....Perhaps some further questions !
Thanks a lot Ron.
Best regards
Yves

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants