g.extension crashed with FileNotFoundError in _execute_child(): [Errno 2] No such file or directory: 'svn'

Bug #1956776 reported by TMC
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grass (Ubuntu)
New
Medium
Unassigned

Bug Description

Grass v.7.8.2
Ubuntu 20.04.3

Using grass_gui, attempted to install extension 'r.in.usgs'. Results returned 'FileNotFoundError' then application crashed.

###
(Fri Jan 7 11:24:18 2022)
g.extension --verbose extension=r.in.usgs
Fetching <r.in.usgs> from GRASS GIS Addons repository (be patient)...
Downloading source code for <r.in.usgs> from <https://github.com/OSGeo/grass-addons/trunk/grass7/raster/r.in.usgs> which is identified as 'official' type of source...
Traceback (most recent call last):
  File "/usr/lib/grass78/scripts/g.extension", line 1976, in
<module>
    sys.exit(main())
  File "/usr/lib/grass78/scripts/g.extension", line 1956, in
main
    install_extension(source=source, url=url, xmlurl=xmlurl)
  File "/usr/lib/grass78/scripts/g.extension", line 681, in
install_extension
    ret1, installed_modules, tmp_dir =
install_extension_std_platforms(module,
  File "/usr/lib/grass78/scripts/g.extension", line 1292, in
install_extension_std_platforms
    download_source_code(source=source, url=url, name=name,
  File "/usr/lib/grass78/scripts/g.extension", line 1233, in
download_source_code
    download_source_code_official_github(url, name, outdev,
directory)
  File "/usr/lib/grass78/scripts/g.extension", line 1119, in
download_source_code_official_github
    if grass.call(['svn', 'export',
  File "/usr/lib/grass78/etc/python/grass/script/core.py",
line 74, in call
    return Popen(*args, **kwargs).wait()
  File "/usr/lib/grass78/etc/python/grass/script/core.py",
line 63, in __init__
    subprocess.Popen.__init__(self, args, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 858, in
__init__
    self._execute_child(args, executable, preexec_fn,
close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in
_execute_child
    raise child_exception_type(errno_num, err_msg,
err_filename)
FileNotFoundError: [Errno 2] No such file or directory:
'svn'
(Fri Jan 7 11:24:19 2022) Command finished (0 sec)
##

ProblemType: Crash
DistroRelease: Ubuntu 20.04
Package: grass-core 7.8.2-1build3
ProcVersionSignature: Ubuntu 5.11.0-44.48~20.04.2-generic 5.11.22
Uname: Linux 5.11.0-44-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.21
Architecture: amd64
CasperMD5CheckResult: skip
CrashCounter: 1
CurrentDesktop: XFCE
Date: Fri Jan 7 11:24:19 2022
ExecutablePath: /usr/lib/grass78/scripts/g.extension
InstallationDate: Installed on 2021-11-12 (55 days ago)
InstallationMedia: Xubuntu 20.04.3 LTS "Focal Fossa" - Release amd64 (20210819.1)
InterpreterPath: /usr/bin/python3.8
ProcCmdline: /usr/bin/python3 /usr/lib/grass78/scripts/g.extension --verbose extension=r.in.usgs
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonArgs: ['/usr/lib/grass78/scripts/g.extension', '--verbose', 'extension=r.in.usgs']
PythonDetails: N/A
SourcePackage: grass
Title: g.extension crashed with FileNotFoundError in _execute_child(): [Errno 2] No such file or directory: 'svn'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo users
mtime.conffile..etc.apport.crashdb.conf: 2021-12-14T10:49:27.421187

Revision history for this message
TMC (linux-tmc) wrote :
information type: Private → Public
Revision history for this message
Markus Neteler (neteler) wrote :

The reason is that the GRASS GIS Addons repository has been restructured in 2021 to distinguish GRASS GIS 7 from the new version 8.

Hence,

`Downloading source code for <r.in.usgs> from <https://github.com/OSGeo/grass-addons/trunk/grass7/raster/r.in.usgs>`

is no longer a valid path, the new path is:

https://github.com/OSGeo/grass-addons/tree/grass7/src/raster/r.in.usgs

Possibilities for you:
a) you use GRASS GIS 7.8.2 which is fairly old. Please update as `g.extension` has been updated accordingly to use the new path in later versions (starting from GRASS GIS 7.8.6).
b) if that's not possible, you may edit your local `g.extension` file in `/usr/lib64/grass78/scripts/g.extension`, using the changes provided here: https://github.com/OSGeo/grass/pull/1762

See also:

https://trac.osgeo.org/grass/wiki/Release/7.8.6-News#Majormodulechanges
- G78:g.extension: updated to match new addon repository structure (​PR:1762)

Revision history for this message
Markus Neteler (neteler) wrote :

In essence, it has already been fixed in GRASS GIS 7.8.6.

tags: removed: need-duplicate-check
Changed in grass (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.