[GRASS-git] [OSGeo/grass-addons] 495803: r.in.nasadem: fix name 'srid' is not defined (#678)

Markus Neteler noreply at github.com
Mon Jan 17 03:06:30 PST 2022


  Branch: refs/heads/grass7
  Home:   https://github.com/OSGeo/grass-addons
  Commit: 495803b20fd782b4c0a2f249221e34cb02b0ec1f
      https://github.com/OSGeo/grass-addons/commit/495803b20fd782b4c0a2f249221e34cb02b0ec1f
  Author: Markus Neteler <neteler at gmail.com>
  Date:   2022-01-17 (Mon, 17 Jan 2022)

  Changed paths:
    M src/raster/r.in.nasadem/r.in.nasadem.py

  Log Message:
  -----------
  r.in.nasadem: fix name 'srid' is not defined (#678)

* r.in.nasadem: fix name 'srid' is not defined

This PR fixes the following Python error:

```
GRASS eu_laea_epsg3035/nasadem:~ > r.in.nasadem user=xxxx password=yyyyy output=nasadem memory=4000 method=bilinear_f resolution=30
Traceback (most recent call last):
  File "/home/mundialis/.grass8/addons/scripts/r.in.nasadem", line 645, in <module>
    main()
  File "/home/mundialis/.grass8/addons/scripts/r.in.nasadem", line 490, in main
    SRCGISRC, TMPLOC = createTMPlocation()
  File "/home/mundialis/.grass8/addons/scripts/r.in.nasadem", line 350, in createTMPlocation
    currepsg = ":".join(srid.split(":")[-1:])
NameError: name 'srid' is not defined
ERROR: Region <r_in_nasadem_region_285028> not found
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/mundialis/.grass8/addons/scripts/r.in.nasadem", line 314, in cleanup
    grass.run_command("g.region", region=tmpregionname)
  File "/home/mundialis/software/grass80/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 541, in run_command
    return handle_errors(returncode, result=None, args=args, kwargs=kwargs)
  File "/home/mundialis/software/grass80/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py", line 429, in handle_errors
    raise CalledModuleError(module=module, code=code, returncode=returncode)
grass.exceptions.CalledModuleError: Module run `g.region region=r_in_nasadem_region_285028` ended with an error.
The subprocess ended with a non-zero return code: 1. See errors above the traceback or in the error output.
```

* simple remove of the offending superfluous line




More information about the grass-commit mailing list