discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: gr_modtool in conda failing


From: Ryan Volz
Subject: Re: gr_modtool in conda failing
Date: Mon, 1 Aug 2022 14:11:37 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

Hi Jameson,

I figured it out! First I recreated the same exact environment as you, and I still didn't see the error. Then I realized that GNU Radio was getting the `newmod_path` for the template from ~/.gnuradio/config.conf, and mine was pointing to a newer installation. (That's something that own its own needs a fix, in my view.) Once I got it pointing to the actual GR 3.8.2 installation, then I saw the same error.

That let me track it down to essentially the same problem as https://github.com/gnuradio/gnuradio/issues/5068, which is that the template as installed by conda was including __pycache__ .pyc files, and those were causing the exception. I fixed that particular issue with the conda packaging before releasing GR 3.8.3.1. Can you use a newer version of GR 3.8? If you just change your installation to `conda install gnuradio=3.8`, you should get a version of modtool that works. Either that or go to

/home/jcollins/Downloads/temp/deleteme/envs/asdf/lib/python3.9/site-packages/gnuradio/modtool/templates/

and delete the __pycache__ folder.

Cheers,
Ryan

On 8/1/22 1:14 PM, Jameson Collins wrote:
Hey Ryan,

I'm trying in a totally fresh environment on Ubuntu 20:

```
cd Downloads/
mkdir temp
cd temp
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh <https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh>
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
eval "$(/home/user/Downloads/temp/deleteme/bin/conda shell.bash hook)"
conda create -n asdf
conda activate asdf
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install gnuradio=3.8.2
gr_modtool newmod
```


Here is the output of `conda list`:
````
# packages in environment at /home/jcollins/Downloads/temp/deleteme/envs/asdf:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
adwaita-icon-theme        41.0                 ha770c72_1    conda-forge
alsa-lib                  1.2.3.2              h166bdaf_0    conda-forge
at-spi2-atk               2.38.0               h0630a04_3    conda-forge
at-spi2-core              2.40.3               h0630a04_0    conda-forge
atk-1.0                   2.36.0               h3371d22_4    conda-forge
attr                      2.5.1                h166bdaf_0    conda-forge
boost-cpp                 1.74.0               h6cacc03_7    conda-forge
brotlipy                  0.7.0           py39hb9d737c_1004    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2022.6.15            ha878542_0    conda-forge
cairo                     1.16.0            ha12eb4b_1010    conda-forge
certifi                   2022.6.15        py39hf3d152e_0    conda-forge
cffi                      1.15.1           py39he91dace_0    conda-forge
charset-normalizer        2.1.0              pyhd8ed1ab_0    conda-forge
click                     8.1.3            py39hf3d152e_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
codec2                    0.9.2                h7f98852_1    conda-forge
cryptography              37.0.4           py39hd97740a_0    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
epoxy                     1.5.10               h166bdaf_1    conda-forge
expat                     2.4.8                h27087fc_0    conda-forge
fftw                      3.3.10          nompi_h77c792f_102    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.0               h8e229c2_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
fribidi                   1.0.10               h36c2ea0_0    conda-forge
gdk-pixbuf                2.42.8               hff1cb4f_0    conda-forge
gettext                   0.19.8.1          h73d1719_1008    conda-forge
glib                      2.72.1               h6239696_0    conda-forge
glib-tools                2.72.1               h6239696_0    conda-forge
gnuradio                  3.8.2.0          py39h81c97bc_8    conda-forge
gnuradio-core             3.8.2.0          py39h62466b6_8    conda-forge
gnuradio-grc              3.8.2.0          py39hc76a25d_8    conda-forge
gnuradio-qtgui            3.8.2.0          py39hbc3867e_8    conda-forge
gnuradio-uhd              3.8.2.0          py39h33996e5_8    conda-forge
gnuradio-video-sdl        3.8.2.0          py39hc76a25d_8    conda-forge
gnuradio-zeromq           3.8.2.0          py39h72561b3_8    conda-forge
graphite2                 1.3.13            h58526e2_1001    conda-forge
gsl                       2.6                  he838d99_2    conda-forge
gst-plugins-base          1.20.2               hcf0ee16_0    conda-forge
gstreamer                 1.20.3               hd4edc92_0    conda-forge
gstreamer-orc             0.4.32               h7f98852_1    conda-forge
gtk3                      3.24.33              h13ada96_1    conda-forge
harfbuzz                  4.2.0                h40b6f09_0    conda-forge
hicolor-icon-theme        0.17                 ha770c72_2    conda-forge
icu                       69.1                 h9c3ff4c_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.11.4           py39hf3d152e_0    conda-forge
jack                      1.9.18            hfd4fe87_1001    conda-forge
jpeg                      9e                   h166bdaf_2    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.19.3               h3790be6_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libblas                   3.9.0           15_linux64_openblas    conda-forge
libcap                    2.64                 ha37c62d_0    conda-forge
libcblas                  3.9.0           15_linux64_openblas    conda-forge
libclang                  13.0.1          default_hc23dcda_0    conda-forge
libcups                   2.3.3                hf5a7f15_1    conda-forge
libdb                     6.2.32               h9c3ff4c_0    conda-forge
libdeflate                1.12                 h166bdaf_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libevent                  2.1.10               h9b69904_4    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libflac                   1.3.4                h27087fc_0    conda-forge
libgcc-ng                 12.1.0              h8d9b700_16    conda-forge
libgfortran-ng            12.1.0              h69a702a_16    conda-forge
libgfortran5              12.1.0              hdcd56e2_16    conda-forge
libgirepository           1.72.0               h26ff761_1    conda-forge
libglib                   2.72.1               h2d90d5f_0    conda-forge
libgomp                   12.1.0              h8d9b700_16    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0           15_linux64_openblas    conda-forge
libllvm13                 13.0.1               hf817b99_2    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libogg                    1.3.4                h7f98852_1    conda-forge
libopenblas               0.3.20          pthreads_h78a6416_1    conda-forge
libopus                   1.3.1                h7f98852_1    conda-forge
libpng                    1.6.37               h753d276_3    conda-forge
libpq                     14.4                 hd77ab85_0    conda-forge
librsvg                   2.52.5               h0a9e6e8_3    conda-forge
libsndfile                1.0.31               h9c3ff4c_1    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libstdcxx-ng              12.1.0              ha89aaad_16    conda-forge
libtiff                   4.4.0                h0d92c0b_2    conda-forge
libtool                   2.4.6             h9c3ff4c_1008    conda-forge
libudev1                  249                  h166bdaf_4    conda-forge
libusb                    1.0.26             h0b4f0b6_100    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
libwebp-base              1.2.3                h166bdaf_2    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
libxkbcommon              1.0.3                he3ba5ed_0    conda-forge
libxml2                   2.9.12               h885dcf4_1    conda-forge
libxslt                   1.1.33               h0ef7038_3    conda-forge
libzlib                   1.2.12               h166bdaf_2    conda-forge
log4cpp                   1.1.3             h9c3ff4c_1003    conda-forge
lxml                      4.8.0            py39hb9d737c_2    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
mako                      1.2.1              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.1            py39hb9d737c_1    conda-forge
mpir                      3.0.0             hf484d3e_1002    conda-forge
mysql-common              8.0.29               haf5c9bc_1    conda-forge
mysql-libs                8.0.29               h28c427c_1    conda-forge
ncurses                   6.3                  h27087fc_1    conda-forge
nspr                      4.32                 h9c3ff4c_1    conda-forge
nss                       3.78                 h2350873_0    conda-forge
numpy                     1.23.1           py39hba7629e_0    conda-forge
openssl                   1.1.1q               h166bdaf_0    conda-forge
pango                     1.50.7               hbd2fdc8_0    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
pip                       22.2.1             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h36c2ea0_0    conda-forge
portaudio                 19.6.0               hae3ed74_4    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pulseaudio                14.0                 hbc9ff1d_7    conda-forge
pycairo                   1.21.0           py39h0934665_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygobject                 3.42.2           py39habf54e5_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyqt                      5.12.3           py39hf3d152e_8    conda-forge
pyqt-impl                 5.12.3           py39hde8b62d_8    conda-forge
pyqt5-sip                 4.19.18          py39he80948d_8    conda-forge
pyqtchart                 5.12             py39h0fcd23e_8    conda-forge
pyqtwebengine             5.12.1           py39h0fcd23e_8    conda-forge
pysocks                   1.7.1            py39hf3d152e_5    conda-forge
python                    3.9.13          h9a8a25e_0_cpython    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pyyaml                    6.0              py39hb9d737c_4    conda-forge
pyzmq                     23.2.0           py39headdf64_0    conda-forge
qt                        5.12.9               h1304e3e_6    conda-forge
qwt                       6.1.6                h7ec6b3e_0    conda-forge
readline                  8.1.2                h0f457ee_0    conda-forge
requests                  2.28.1             pyhd8ed1ab_0    conda-forge
sdl                       1.2.52               h27087fc_1    conda-forge
sdl2                      2.0.22               h55ee7ae_2    conda-forge
setuptools                63.3.0           py39hf3d152e_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.39.2               h4ff8645_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tzdata                    2022a                h191b570_0    conda-forge
uhd                       3.15.0.0         py39h3524f2f_8    conda-forge
urllib3                   1.26.11            pyhd8ed1ab_0    conda-forge
volk                      2.4.1                h9c3ff4c_3    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xorg-fixesproto           5.0               h7f98852_1002    conda-forge
xorg-inputproto           2.3.2             h7f98852_1002    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.0.10               h7f98852_0    conda-forge
xorg-libsm                1.2.3             hd9c2040_1000    conda-forge
xorg-libx11               1.7.2                h7f98852_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxfixes            5.0.3             h7f98852_1004    conda-forge
xorg-libxi                1.7.10               h7f98852_0    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-libxtst              1.2.3             h7f98852_1002    conda-forge
xorg-recordproto          1.14.2            h7f98852_1002    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zipp                      3.8.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.12               h166bdaf_2    conda-forge
zstd                      1.5.2                h8a70e8d_2    conda-forge
```

On Wed, Jul 27, 2022 at 3:35 PM Ryan Volz <ryan.volz@gmail.com <mailto:ryan.volz@gmail.com>> wrote:

    Hi Jameson,

    I just tried this in a fresh environment with gnuradio 3.8.2 and python
    3.8.13, and I was unable to reproduce the error. Maybe some of my
    packages were newer than what you have. Can you try upgrading packages
    to their latest versions? In other words, maybe you have an older build
    of gnuradio 3.8.2 that was fixed in a subsequent build of that same
    version number.

    Or maybe this has a similar cause to
    https://github.com/gnuradio/gnuradio/issues/5068
    <https://github.com/gnuradio/gnuradio/issues/5068>?

    Cheers,
    Ryan

    On 7/26/22 1:20 PM, Jameson Collins wrote:
     > miniforge conda environment, gnuradio 3.8.2.0
     >
     > (gnuradio) user@user-VirtualBox-20$ gr_modtool newmod
     > Name of the new module: asdf
     > Creating out-of-tree module in ./gr-asdf...
     > Traceback (most recent call last):
     >    File
     > "/home/user/build/conda/miniforge3/envs/gnuradio/bin/gr_modtool",
    line
     > 30, in <module>
     >      cli()
     >    File
     >
    
"/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/click/core.py",

     > line 1130, in __call__
     >      return self.main(*args, **kwargs)
     >    File
     >
    
"/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/click/core.py",

     > line 1055, in main
     >      rv = self.invoke(ctx)
     >    File
     >
    
"/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/click/core.py",

     > line 1657, in invoke
     >      return _process_result(sub_ctx.command.invoke(sub_ctx))
     >    File
     >
    
"/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/click/core.py",

     > line 1404, in invoke
     >      return ctx.invoke(self.callback, **ctx.params)
     >    File
     >
    
"/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/click/core.py",

     > line 760, in invoke
     >      return __callback(*args, **kwargs)
     >    File
     >
    
"/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/gnuradio/modtool/cli/base.py",

     > line 153, in wrapper
     >      return func(*args, **kwargs)
     >    File
     >
    
"/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/gnuradio/modtool/cli/newmod.py",

     > line 64, in cli
     >      run(self)
     >    File
     >
    
"/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/gnuradio/modtool/cli/base.py",

     > line 172, in run
     >      module.run()
     >    File
     >
    
"/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/gnuradio/modtool/core/newmod.py",

     > line 91, in run
     >      s = filetext.read()
     >    File
     >
    "/home/user/build/conda/miniforge3/envs/gnuradio/lib/python3.8/codecs.py",

     > line 322, in decode
     >      (result, consumed) = self._buffer_decode(data, self.errors,
    final)
     > UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8d in
    position 12:
     > invalid start byte




reply via email to

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