Uwe Fischer gisfisch at t-online.de
Tue Jun 2 05:42:08 PDT 2020

Hello list,


I tried the following expression in a Python script, but it does not work (I
need to subtract the lowest value for column "srtmh" from all other values
for that item and write the result to column "strmh2"):


grass.run_command('v.db.update', map='dgnpt', column='srtmh2',
qcolumn="('srtmh' - (select min('srtmh') from 'dgnpt'))")


The SQL expression itself seems to be ok, because it works in SpatiaLite in
the following form:


update dgnpt set srtmh2 = srtmh-(select min(srtmh) from srtmp);


What could be the reason that it does not work in GRASS/in the script?


And by the way, when I try scripts I often get a message "Process ended with
non-zero return code 1. See errors in the (error) output."

But what is that error output? Where can I read the error message in detail?
Sorry for that question, but I found no hints in the manual pages.  :-(



Thanks a lot for help, Uwe


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20200602/bfe7b80b/attachment.html>

More information about the grass-user mailing list