Opened 5 years ago

Closed 4 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: grass-dev@…
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 Changed 5 years ago by hellik

Summary: GRASS GIS 6.4.5 svn r.li modules - issues with hard coded path to conf fileswinGRASS GIS 6.4.5 svn r.li modules - issues with hard coded path to conf files

comment:2 Changed 5 years ago by hellik

Keywords: wingrass r.li added

comment:3 in reply to:  description ; Changed 5 years ago by 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).

Does this help?

comment:4 in reply to:  3 Changed 5 years ago by hellik

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

comment:5 in reply to:  description ; Changed 5 years ago by 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\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

comment:6 in reply to:  5 ; Changed 5 years ago by hellik

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\movwindow7

Note 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 in reply to:  6 Changed 5 years ago by hellik

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 Changed 5 years ago by neteler

Improved docs in G7: r61665 (r61666) and G6: r61667 (r61668). Please check.

comment:9 in reply to:  description Changed 5 years ago by neteler

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:10 Changed 4 years ago by martinl

Milestone: 6.4.5

Ticket retargeted after milestone closed

comment:11 Changed 4 years ago by martinl

Milestone: 6.4.6

comment:12 Changed 4 years ago by 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"?

comment:13 in reply to:  12 Changed 4 years ago by hellik

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.