Re: gnuradio 3.8 errors with gr_modtool

2020-02-26 Thread Laura Arjona
Thank you very much Josh and Maitland for your quick help,  appreciate it.

Maitland, I executed the command that you mentioned, and problem solved =D

Looking forward now to try the new gnuradio version!

Cheers

On Wed, Feb 26, 2020 at 7:48 AM Morman, Joshua 
wrote:

> Hi Laura,
>
>
> Thank you for raising this issue.  Maitland pinged me offline with the
> fixes he did on this issue in the Debian packages which are basically
> copied into the PPAs you are using with minor modifications.
>
>
> I have now applied his fixes (and updated the ppa packages to the recent
> RC release), so the ppa cleans the byte compiled code from the installation
> for Ubuntu >= 19.  For Ubuntu 18 the issue still remains.
>
>
> For Ubuntu 18 - navigate to
> /usr/share/gnuradio/modtool/templates/gr-newmod/
>
> and run
>
> sudo py3clean .
>
>
> This should clean the files that are causing issue.
>
>
>
> Josh
>
>
> -- Forwarded message -----
> From: *Laura Arjona* 
> Date: Tue, Feb 25, 2020 at 5:25 PM
> Subject: Re: gnuradio 3.8 errors with gr_modtool
> To: Maitland Bottoms 
> Cc: GNURadio Discussion List 
>
>
> just in case, I removed the only .pyc file I found under
> /usr/share/gnuradio/modtool/templates/gr-newmod/python/__pycache
> /usr/share/gnuradio/modtool/templates/gr-newmod/python/__pycache__$   sudo
> rm *pyc
>
> The same error occurs.
>
> Thank you!
>
> On Tue, Feb 25, 2020 at 2:17 PM Laura Arjona  wrote:
>
> Thank you Maitland.
> Is there a "safer" way of installing gnuradio 3.8?
>
> Matiland - there is not such a folder in /modtool/gr-newmod.
> I only have /usr/share/gnuradio/modtool/template
>
> On Tue, Feb 25, 2020 at 1:13 PM Maitland Bottoms  wrote:
>
> Laura Arjona  writes:
>
> > 1 - Installed fresh Ubuntu 18.04.4 LTS
> > 2- Installed git, cmake, swig, gnuradio.
> > To install gnuradio, I used:
> >   $ sudo add-apt-repository ppa:gnuradio/gnuradio-releases
> >$ sudo apt-get update
> >$ sudo apt-get install gnuradio
> >
> At this point you have .pyc files where they do not belong, since as of
> just now the ppa packages are still buggy.
>
> You can
>  `sudo rm /usr/share/gnuradio/modtool/gr-newmod/python/*pyc`
> and get on with life.
>
> Hopefully the ppa packegs will be fixed soon...
>
> -Maitland
>
>
>
> --
> *Laura Arjona *
> Washington Research Foundation Innovation Postdoctoral Fellow in
> Neuroengineering
>
> *Paul G. Allen School of Computer Science & Engineering*
> 185 E Stevens Way NE
> University of Washington
> Seattle, WA 98195-2350
>
>
>
> --
> *Laura Arjona *
> Washington Research Foundation Innovation Postdoctoral Fellow in
> Neuroengineering
>
> *Paul G. Allen School of Computer Science & Engineering*
> 185 E Stevens Way NE
> University of Washington
> Seattle, WA 98195-2350
>


-- 
*Laura Arjona *
Washington Research Foundation Innovation Postdoctoral Fellow in
Neuroengineering

*Paul G. Allen School of Computer Science & Engineering*
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350


Re: gnuradio 3.8 errors with gr_modtool

2020-02-26 Thread Morman, Joshua
Hi Laura,


Thank you for raising this issue.  Maitland pinged me offline with the fixes he 
did on this issue in the Debian packages which are basically copied into the 
PPAs you are using with minor modifications.


I have now applied his fixes (and updated the ppa packages to the recent RC 
release), so the ppa cleans the byte compiled code from the installation for 
Ubuntu >= 19.  For Ubuntu 18 the issue still remains.


For Ubuntu 18 - navigate to /usr/share/gnuradio/modtool/templates/gr-newmod/

and run

sudo py3clean .


This should clean the files that are causing issue.



Josh


-- Forwarded message -
From: Laura Arjona mailto:arjo...@uw.edu>>
Date: Tue, Feb 25, 2020 at 5:25 PM
Subject: Re: gnuradio 3.8 errors with gr_modtool
To: Maitland Bottoms mailto:aa...@amrad.org>>
Cc: GNURadio Discussion List 
mailto:discuss-gnuradio@gnu.org>>


just in case, I removed the only .pyc file I found under 
/usr/share/gnuradio/modtool/templates/gr-newmod/python/__pycache
/usr/share/gnuradio/modtool/templates/gr-newmod/python/__pycache__$   sudo rm 
*pyc

The same error occurs.

Thank you!

On Tue, Feb 25, 2020 at 2:17 PM Laura Arjona 
mailto:arjo...@uw.edu>> wrote:
Thank you Maitland.
Is there a "safer" way of installing gnuradio 3.8?

Matiland - there is not such a folder in /modtool/gr-newmod.
I only have /usr/share/gnuradio/modtool/template

On Tue, Feb 25, 2020 at 1:13 PM Maitland Bottoms 
mailto:aa...@amrad.org>> wrote:
Laura Arjona mailto:arjo...@uw.edu>> writes:

> 1 - Installed fresh Ubuntu 18.04.4 LTS
> 2- Installed git, cmake, swig, gnuradio.
> To install gnuradio, I used:
>   $ sudo add-apt-repository ppa:gnuradio/gnuradio-releases
>$ sudo apt-get update
>$ sudo apt-get install gnuradio
>
At this point you have .pyc files where they do not belong, since as of
just now the ppa packages are still buggy.

You can
 `sudo rm /usr/share/gnuradio/modtool/gr-newmod/python/*pyc`
and get on with life.

Hopefully the ppa packegs will be fixed soon...

-Maitland


--
Laura Arjona
Washington Research Foundation Innovation Postdoctoral Fellow in 
Neuroengineering

Paul G. Allen School of Computer Science & Engineering
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350


--
Laura Arjona
Washington Research Foundation Innovation Postdoctoral Fellow in 
Neuroengineering

Paul G. Allen School of Computer Science & Engineering
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350


Re: gnuradio 3.8 errors with gr_modtool

2020-02-25 Thread Laura Arjona
just in case, I removed the only .pyc file I found under
/usr/share/gnuradio/modtool/templates/gr-newmod/python/__pycache
/usr/share/gnuradio/modtool/templates/gr-newmod/python/__pycache__$   sudo
rm *pyc

The same error occurs.

Thank you!

On Tue, Feb 25, 2020 at 2:17 PM Laura Arjona  wrote:

> Thank you Maitland.
> Is there a "safer" way of installing gnuradio 3.8?
>
> Matiland - there is not such a folder in /modtool/gr-newmod.
> I only have /usr/share/gnuradio/modtool/template
>
> On Tue, Feb 25, 2020 at 1:13 PM Maitland Bottoms  wrote:
>
>> Laura Arjona  writes:
>>
>> > 1 - Installed fresh Ubuntu 18.04.4 LTS
>> > 2- Installed git, cmake, swig, gnuradio.
>> > To install gnuradio, I used:
>> >   $ sudo add-apt-repository ppa:gnuradio/gnuradio-releases
>> >$ sudo apt-get update
>> >$ sudo apt-get install gnuradio
>> >
>> At this point you have .pyc files where they do not belong, since as of
>> just now the ppa packages are still buggy.
>>
>> You can
>>  `sudo rm /usr/share/gnuradio/modtool/gr-newmod/python/*pyc`
>> and get on with life.
>>
>> Hopefully the ppa packegs will be fixed soon...
>>
>> -Maitland
>>
>
>
> --
> *Laura Arjona *
> Washington Research Foundation Innovation Postdoctoral Fellow in
> Neuroengineering
>
> *Paul G. Allen School of Computer Science & Engineering*
> 185 E Stevens Way NE
> University of Washington
> Seattle, WA 98195-2350
>


-- 
*Laura Arjona *
Washington Research Foundation Innovation Postdoctoral Fellow in
Neuroengineering

*Paul G. Allen School of Computer Science & Engineering*
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350


Re: gnuradio 3.8 errors with gr_modtool

2020-02-25 Thread Laura Arjona
Thank you Maitland.
Is there a "safer" way of installing gnuradio 3.8?

Matiland - there is not such a folder in /modtool/gr-newmod.
I only have /usr/share/gnuradio/modtool/template

On Tue, Feb 25, 2020 at 1:13 PM Maitland Bottoms  wrote:

> Laura Arjona  writes:
>
> > 1 - Installed fresh Ubuntu 18.04.4 LTS
> > 2- Installed git, cmake, swig, gnuradio.
> > To install gnuradio, I used:
> >   $ sudo add-apt-repository ppa:gnuradio/gnuradio-releases
> >$ sudo apt-get update
> >$ sudo apt-get install gnuradio
> >
> At this point you have .pyc files where they do not belong, since as of
> just now the ppa packages are still buggy.
>
> You can
>  `sudo rm /usr/share/gnuradio/modtool/gr-newmod/python/*pyc`
> and get on with life.
>
> Hopefully the ppa packegs will be fixed soon...
>
> -Maitland
>


-- 
*Laura Arjona *
Washington Research Foundation Innovation Postdoctoral Fellow in
Neuroengineering

*Paul G. Allen School of Computer Science & Engineering*
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350


Re: gnuradio 3.8 errors with gr_modtool

2020-02-25 Thread Maitland Bottoms
Laura Arjona  writes:

> 1 - Installed fresh Ubuntu 18.04.4 LTS
> 2- Installed git, cmake, swig, gnuradio.
> To install gnuradio, I used:
>   $ sudo add-apt-repository ppa:gnuradio/gnuradio-releases
>$ sudo apt-get update
>$ sudo apt-get install gnuradio
>
At this point you have .pyc files where they do not belong, since as of
just now the ppa packages are still buggy.

You can
 `sudo rm /usr/share/gnuradio/modtool/gr-newmod/python/*pyc`
and get on with life.

Hopefully the ppa packegs will be fixed soon...

-Maitland



Re: gnuradio 3.8 errors with gr_modtool

2020-02-25 Thread Laura Arjona
Thank you all for your comments.

I re-installed Ubuntu, thinking that it was a problem with  my
installation, but I get the same errors again.

Marcus, I re-installed git, but I get the same error.
I have no idea what is happening. I followed this steps

1 - Installed fresh Ubuntu 18.04.4 LTS
2- Installed git, cmake, swig, gnuradio.
To install gnuradio, I used:
  $ sudo add-apt-repository ppa:gnuradio/gnuradio-releases
   $ sudo apt-get update
   $ sudo apt-get install gnuradio


3. Then when I use gr_modtool, I get the errors I reported in the first
message.

Any help would be greatly appreciate it, thanks!

On Fri, Feb 21, 2020 at 4:22 PM Maitland Bottoms  wrote:

> On Fri, 21 Feb 2020 10:58:18 -0800
> Laura Arjona  wrote:
>
> > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position
> > 5: invalid continuation byte
>
> The problem comes from Python byte-compiled files used as templates.
>
> Perhaps the template processor is choking on a .pyc file?
>
> The solution is to remove all .pyc files found under
> /usr/share/gnuradio/modtool/gr-newmod
> (or whatever the correct path is for the modtool template directory
> in your installation.)
>
> If you have files like
> .../gnuradio/modtool/gr-newmod/python/build_utils_codes.pyc
> .../gnuradio/modtool/gr-newmod/python/build_utils.pyc
> .../gnuradio/modtool/gr-newmod/python/__init__.pyc
>
> then this is likely the trouble.
>
> In Debian, this bug is #946120
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946120
>
> It has been fixed in Debian's gnuradio 3.8 packages, so I am curious
> about how you might have ended up with this trouble.
>
> Hope that helps,
> -Maitland
>
>

-- 
*Laura Arjona *
Washington Research Foundation Innovation Postdoctoral Fellow in
Neuroengineering

*Paul G. Allen School of Computer Science & Engineering*
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350


Re: gnuradio 3.8 errors with gr_modtool

2020-02-21 Thread Maitland Bottoms
On Fri, 21 Feb 2020 10:58:18 -0800
Laura Arjona  wrote:

> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position
> 5: invalid continuation byte

The problem comes from Python byte-compiled files used as templates.

Perhaps the template processor is choking on a .pyc file?

The solution is to remove all .pyc files found under
/usr/share/gnuradio/modtool/gr-newmod
(or whatever the correct path is for the modtool template directory
in your installation.)

If you have files like
.../gnuradio/modtool/gr-newmod/python/build_utils_codes.pyc
.../gnuradio/modtool/gr-newmod/python/build_utils.pyc
.../gnuradio/modtool/gr-newmod/python/__init__.pyc

then this is likely the trouble.

In Debian, this bug is #946120
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946120

It has been fixed in Debian's gnuradio 3.8 packages, so I am curious
about how you might have ended up with this trouble.

Hope that helps,
-Maitland



Re: gnuradio 3.8 errors with gr_modtool

2020-02-21 Thread Marcus Müller
Hi Laura,

On Fri, 2020-02-21 at 10:58 -0800, Laura Arjona wrote:
> /bin/sh: 1: git: not found

could you install git and try again (and, please, report the result)?

Best regards,
Marcus




gnuradio 3.8 errors with gr_modtool

2020-02-21 Thread Laura Arjona
Hi community,
I encountered 2 problems while creating a new OOT module with GNURadio 3.8,
(never encountered that problem before with older gnuradio versions).

I did debugging, but I have no idea what is causing this problem. Thanks in
advance for your help :)

I have this configuration

$ python3 --version
Python 3.6.9
$gnuradio-config-info --version
3.8.0.0


*Error 1 with newmod*
$ gr_modtool newmod test_block
Creating out-of-tree module in ./gr-test_block...
Traceback (most recent call last):
  File "/usr/bin/gr_modtool", line 30, in 
cli()
  File "/usr/lib/python3/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/cli/base.py", line
153, in wrapper
return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/cli/newmod.py",
line 64, in cli
run(self)
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/cli/base.py", line
172, in run
module.run()
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/core/newmod.py",
line 91, in run
s = filetext.read()
  File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 5:
invalid continuation byte



*Error 2:  with add (the files .h in the /include directore are not being
generated)*
/gr-test_block$ gr_modtool add -t general -l cpp block1
GNU Radio module name identified: test_block
Language: C++
Block/code identifier: block1
/bin/sh: 1: git: not found
Please specify the copyright holder: me
Enter valid argument list, including default arguments:
input1
Add Python QA code? [Y/n] n
Add C++ QA code? [Y/n] n
Adding file 'lib/block1_impl.h'...
Adding file 'lib/block1_impl.cc'...
Adding file 'include/test_block/block1.h'...
Traceback (most recent call last):
  File "/usr/bin/gr_modtool", line 30, in 
cli()
  File "/usr/lib/python3/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/cli/base.py", line
153, in wrapper
return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/cli/add.py", line
81, in cli
run(self)
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/cli/base.py", line
172, in run
module.run()
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/core/add.py", line
141, in run
self._run_lib()
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/core/add.py", line
195, in _run_lib
self._write_tpl('block_def_h',self.info['includedir'], fname_h)
  File "/usr/lib/python3/dist-packages/gnuradio/modtool/core/add.py", line
124, in _write_tpl
with open(path_to_file, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory:
'include/test_block/block1.h'

-- 
*Laura Arjona *
Washington Research Foundation Innovation Postdoctoral Fellow in
Neuroengineering

*Paul G. Allen School of Computer Science & Engineering*
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350