downloading the zipped addon, which is used by g.extension in windows, from here:
https://wingrass.fsv.cvut.cz/grass78/x86_64/addons/latest/
in the subfolder i.fusion.hpf\etc\i.fusion.hpf, there is a subfolder __pycache__
i.fusion.hpf\etc\i.fusion.hpf\__pycache__>ls
constants.cpython-37.pyc
high_pass_filter.cpython-37.pyc
the compiled python bytecode shouldn't be there in the zip file.
g,extension fails if there are some cruft files inside the precompiled zip-files used by winGRASS.
To Reproduce
Steps to reproduce the behavior:
start winGRASS
g.extension extension=i.fusion.hpf
See error:
in winGRASS 7.8.5
g.extension extension=i.fusion.hpf
Downloading precompiled GRASS Addons <i.fusion.hpf>...
Fetching <i.fusion.hpf> from <http://wingrass.fsv.cvut.cz/grass78/x86_64/addons/grass-7.8.5/i.fusion.hpf.zip> (be patient)...
Traceback (most recent call last):
File
"C:\OSGEO4~1\apps\grass\grass78/scripts/g.extension.py",
line 2350, in <module>
sys.exit(main())
File
"C:\OSGEO4~1\apps\grass\grass78/scripts/g.extension.py",
line 2330, in main
install_extension(source=source, url=url, xmlurl=xmlurl,
branch=branch)
File
"C:\OSGEO4~1\apps\grass\grass78/scripts/g.extension.py",
line 871, in install_extension
ret1, new_modules_ext, new_files_ext =
install_extension_win(extension)
File
"C:\OSGEO4~1\apps\grass\grass78/scripts/g.extension.py",
line 1259, in install_extension_win
for line in file:
File "C:\OSGEO4~1\apps\Python37\lib\fileinput.py", line
252, in __next__
line = self._readline()
File "C:\OSGEO4~1\apps\Python37\lib\fileinput.py", line
366, in _readline
return self._readline()
File "C:\OSGEO4~1\apps\Python37\lib\encodings\cp1252.py",
line 23, in decode
return
codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d
in position 401: character maps to <undefined>
in winGRASS 7.9.dev
g.extension extension=i.fusion.hpf
Downloading precompiled GRASS Addons <i.fusion.hpf>...
Fetching <i.fusion.hpf> from <http://wingrass.fsv.cvut.cz/grass79/x86_64/addons/grass-7.9.dev/i.fusion.hpf.zip> (be patient)...
Traceback (most recent call last):
File
"C:\OSGEO4~1\apps\grass\grass79/scripts/g.extension.py",
line 2484, in <module>
sys.exit(main())
File
"C:\OSGEO4~1\apps\grass\grass79/scripts/g.extension.py",
line 2463, in main
install_extension(source=source, url=url, xmlurl=xmlurl,
branch=branch)
File
"C:\OSGEO4~1\apps\grass\grass79/scripts/g.extension.py",
line 892, in install_extension
ret1, new_modules_ext, new_files_ext =
install_extension_win(extension)
File
"C:\OSGEO4~1\apps\grass\grass79/scripts/g.extension.py",
line 1308, in install_extension_win
for line in file:
File "C:\OSGEO4~1\apps\Python37\lib\fileinput.py", line
252, in __next__
line = self._readline()
File "C:\OSGEO4~1\apps\Python37\lib\fileinput.py", line
366, in _readline
return self._readline()
File "C:\OSGEO4~1\apps\Python37\lib\encodings\cp1252.py",
line 23, in decode
return
codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d
in position 401: character maps to <undefined>
Describe the bug first reported by @veroandreo in [GRASS-user] error in g.extension while installing i.fusion.hpf in windows
some more findings are here
g,extension fails if there are some cruft files inside the precompiled zip-files used by winGRASS.
To Reproduce Steps to reproduce the behavior:
in winGRASS 7.8.5
in winGRASS 7.9.dev
Expected behavior
or
System description
OS: windows