discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: ModuleNotFoundError while running unit test of the OOT


From: Jeff Long
Subject: Re: ModuleNotFoundError while running unit test of the OOT
Date: Sun, 24 Oct 2021 16:29:46 -0400

That workaround doesn't make sense. The idea, though, is that some files need to be moved/symlinked so Python can see them. Or the PYTHONPATH needs adjustment.

On Sun, Oct 24, 2021 at 4:23 PM Jeff Long <willcode4@gmail.com> wrote:
This is also true on the latest dev/master, and it was possible to do a "make test" before "make install" in 3.8. This has been noted in https://github.com/gnuradio/gnuradio/issues/4825, which also includes a workaround.

On Sun, Oct 24, 2021 at 1:47 PM Marcin Puchlik via GNU Radio, the Free & Open-Source Toolkit for Software Radio <discuss-gnuradio@gnu.org> wrote:
Hi,
While creating a squaring OOT module (just as an example), my unit test failed because of ModuleNotFoundError.
This error occurs before running make install. After running make install module is available and test is passing ok but it doesn't make sense to do that. 
I am using 3.9.3.0 version of GNU Radio. I expect that after running make there will be a python module called square (as I named my OOT, am I correct?)  
Below is the output after running ctest -VV command:

Note: below output is obtained after running make install and then make uninstall (after make install, module is available and the is no error)

UpdateCTestConfiguration  from :/home/ubuntu/prefixes/gnuradio39/OOTs/gr-square/build/DartConfiguration.tcl
UpdateCTestConfiguration  from :/home/ubuntu/prefixes/gnuradio39/OOTs/gr-square/build/DartConfiguration.tcl
Test project /home/ubuntu/prefixes/gnuradio39/OOTs/gr-square/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: qa_square_ff

1: Test command: /usr/bin/sh "/home/ubuntu/prefixes/gnuradio39/OOTs/gr-square/build/python/qa_square_ff_test.sh"
1: Test timeout computed to be: 10000000
1: Traceback (most recent call last):
1:   File "/home/ubuntu/prefixes/gnuradio39/OOTs/gr-square/python/qa_square_ff.py", line 12, in <module>
1:     from square import square_ff
1: ImportError: cannot import name 'square_ff' from 'square' (unknown location)
1:
1: During handling of the above exception, another exception occurred:
1:
1: Traceback (most recent call last):
1:   File "/home/ubuntu/prefixes/gnuradio39/OOTs/gr-square/python/qa_square_ff.py", line 18, in <module>
1:     from square import square_ff
1: ImportError: cannot import name 'square_ff' from 'square' (unknown location)
1/1 Test #1: qa_square_ff .....................***Failed    0.26 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.27 sec

The following tests FAILED:
 1 - qa_square_ff (Failed)
Errors while running CTest


reply via email to

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