Opened 10 years ago
Closed 9 years ago
#2392 closed defect (fixed)
winGRASS GIS 6.4.5 svn r.li modules - issues with hard coded path to conf files
Reported by: | hellik | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 6.4.6 |
Component: | Raster | Version: | svn-releasebranch64 |
Keywords: | wingrass, r.li | Cc: | |
CPU: | x86-32 | Platform: | MSWindows 7 |
Description
from the ML
http://lists.osgeo.org/pipermail/grass-dev/2014-August/070384.html
now conf-file generated in winGRASS7.1svn and the conf file stored e.g. C:\Users\normal\AppData\Roaming\GRASS6\movwindow7 some test: r.li.mps --verbose map=myforest at user1 conf=C:\Users\normal\AppData\Roaming\GRASS6\movwindow7 output=myforest_mean_patch_size ERROR: Cannot find configuration file <C:\Users\normal\.r.li\history\C:\Users\normal\AppData\Roaming\GRASS6\movwindow7> r.li.padrange --verbose map=myforest at user1 conf=C:\Users\normal\AppData\Roaming\GRASS6\movwindow7 output=myforest_padrange ERROR: Cannot find configuration file <C:\Users\normal\.r.li\history\C:\Users\normal\AppData\Roaming\GRASS6\movwindow7> r.li.padsd --verbose map=myforest at user1 conf=C:\Users\normal\AppData\Roaming\GRASS6\movwindow7 output=myforest_padsd ERROR: Cannot find configuration file <C:\Users\normal\.r.li\history\C:\Users\normal\AppData\Roaming\GRASS6\movwindow7> although the path to the conf file is given, it seems it's hard coded where the r.li.*-module looks for the conf file (see doubling the path in the error message) manually creating the .r.li-folder where the module looks for and manually putting there the conf file, the r.li.*-module is working: r.li.padsd --verbose map=myforest at user1 conf=C:\Users\normal\.r.li\history\movwindow7 output=myforest_padsd r.li.padsd komplett. Raster map <myforest_padsd> created.
Change History (13)
comment:1 by , 10 years ago
Summary: | GRASS GIS 6.4.5 svn r.li modules - issues with hard coded path to conf files → winGRASS GIS 6.4.5 svn r.li modules - issues with hard coded path to conf files |
---|
comment:2 by , 10 years ago
Keywords: | wingrass r.li added |
---|
follow-up: 4 comment:3 by , 10 years ago
comment:4 by , 10 years ago
Replying to neteler:
Replying to hellik: ...
although the path to the conf file is given
To my knowledge the path should actually *not* be given (see manual page).
I can't find this in the man page; any hint where it's noted not giving the path?
further there are differences between winGRASS6 and winGRASS7 where the con file is stored by the setup
follow-up: 6 comment:5 by , 10 years ago
Replying to hellik:
from the ML
http://lists.osgeo.org/pipermail/grass-dev/2014-August/070384.html
now conf-file generated in winGRASS7.1svn and the conf file stored e.g. C:\Users\normal\AppData\Roaming\GRASS6\movwindow7
Note that the r.li directory is different in GRASS GIS 6 from than what you tried:
# Linux $HOME/.r.li/history/movwindow7 # Windows (untested, please test) C:\Users\normal\AppData\Roaming\GRASS6\.r.li\history\movwindow7
... and no path in conf= when running the r.li.* modules.
See also: http://grasswiki.osgeo.org/wiki/GRASS_configuration_files_in_home_directory
You may try to use 'g.gisenv set="DEBUG=1"' to check where r.li.* is seeking.
Once understood, we should add a note in grass64/raster/r.li/r.li.setup/description.html
follow-up: 7 comment:6 by , 10 years ago
Replying to neteler:
Replying to hellik:
from the ML
http://lists.osgeo.org/pipermail/grass-dev/2014-August/070384.html
now conf-file generated in winGRASS7.1svn and the conf file stored e.g. C:\Users\normal\AppData\Roaming\GRASS6\movwindow7Note that the r.li directory is different in GRASS GIS 6 from than what you tried:
as setup is not working at the moment in winGRASS6, I've created the conf file in winGRASS7; and there are different places in winGRASS6 and winGRASS7 where the conf file is stored by r.li.setup
# Linux $HOME/.r.li/history/movwindow7 # Windows (untested, please test) C:\Users\normal\AppData\Roaming\GRASS6\.r.li\history\movwindow7
in winGRASS6, it's
C:\Users\normal\.r.li
in winGRASS7, it's
C:\Users\normal\AppData\Roaming\GRASS7
... and no path in conf= when running the r.li.* modules.
See also: http://grasswiki.osgeo.org/wiki/GRASS_configuration_files_in_home_directory
You may try to use 'g.gisenv set="DEBUG=1"' to check where r.li.* is seeking.
as noted before, it's seeked in
C:\Users\normal\.r.li
Once understood, we should add a note in grass64/raster/r.li/r.li.setup/description.html
yes
comment:7 by , 10 years ago
Replying to hellik:
in winGRASS7, it's
C:\Users\normal\AppData\Roaming\GRASS7
it's
C:\Users\normal\AppData\Roaming\GRASS7\r.li
comment:8 by , 10 years ago
comment:9 by , 10 years ago
It appears that the issue only comes up when using the GUI. So:
Replying to hellik: ...
C:\Users\normal\AppData\Roaming\GRASS6\movwindow7
some test:
r.li.mps --verbose map=myforest at user1 conf=C:\Users\normal\AppData\Roaming\GRASS6\movwindow7 output=myforest_mean_patch_size ERROR: Cannot find configuration file <C:\Users\normal\.r.li\history\C:\Users\normal\AppData\Roaming\GRASS6\movwindow7>
I think that the issue in GRASS 6 is that we use the macro G_define_standard_option(G_OPT_F_INPUT) which contains this button generating line Opt->gisprompt = "old_file,file,input";
For GRASS 6, we may need to replace the macro with the full definition in each r.li module and omit the gisprompt line to not have the GUI button. Obviously it becomes more difficult to find the names of the conf file.
Ideally the conf file button would open the ....\.r.li\history\ directory but that's AFAIK not possible. Other ideas?
comment:11 by , 9 years ago
Milestone: | → 6.4.6 |
---|
follow-up: 13 comment:12 by , 9 years ago
A lot of love has been given to r.li in GRASS GIS 7. Maybe we can close this ticket as "fixed in new stable release"?
comment:13 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to neteler:
A lot of love has been given to r.li in GRASS GIS 7. Maybe we can close this ticket as "fixed in new stable release"?
yes; closing ticket.
Replying to hellik: ...
To my knowledge the path should actually *not* be given (see manual page).
Does this help?