grass icon indicating copy to clipboard operation
grass copied to clipboard

[Bug] Error in console on startup : Error reading WIND file, Windows, Grass 8.3.1

Open echoix opened this issue 1 year ago • 5 comments

Describe the bug When GRASS GIS launch with temporary location tmploc (dir C:\Users\User\Documents\grassdata was renamed/moved) error message is printed into CMD.

To Reproduce Steps to reproduce the behavior:

  1. When dir C:\Users\User\Documents\grassdata exists rename it to e.g. data
  2. Launch GRASS GIS
  3. See error in GRASS GIS CMD session (GUI normally start)
C:\Users\User>
ERROR: Unable to read WIND file: not enough values to unpack (expected 2, got 1)

Coordinate system:

C:\Users\User>g.proj -p
XY location (unprojected)

Expected behavior Error message should not be printed into CMD when GRASS GIS start with default unprojected tmploc location.

System description (please complete the following information):

  • Operating System: MS Windows
  • GRASS GIS version: 8.3, 8.4.dev

Additional context Originally posted by @isaacnewtonfx in https://github.com/OSGeo/grass/issues/2101#issuecomment-1867705752

echoix avatar Dec 22 '23 18:12 echoix

@isaacnewtonfx Does this happen in any mapset?

Could you attach the content of the WIND file? When you run g.gisenv in the terminal, the WIND file will be in GISDBASE/LOCATION_NAME/MAPSET folder. I wonder if there is an empty newline somewhere in that file.

petrasovaa avatar Dec 23 '23 05:12 petrasovaa

Hi @petrasovaa this is it. Capture

isaacnewtonfx avatar Dec 23 '23 07:12 isaacnewtonfx

And here is the content of my GRASS_GIS_DATABASE folder

Capture

isaacnewtonfx avatar Dec 23 '23 07:12 isaacnewtonfx

@petrasovaa I just noticed that my GRASS is pointing to a tmploc which does not exist in my GRASS DATABASE. I have changed the location to my existing WGS84 location and restarted GRASS.

It works now without throwing any errors when I launch GRASS.

isaacnewtonfx avatar Dec 23 '23 07:12 isaacnewtonfx

I confirm this behavior under MS Windows OS when grassdata directory was renamed/moved (~first run of GRASS GIS~) with tmploc location.

Content of WIND file C:\Users\User\AppData\Local\Temp\grass8-User-4132\tmploc\PERMANENT\WIND

proj:       0
zone:       0
north:      1
south:      0
east:       1
west:       0
cols:       1
rows:       1
e-w resol:  1
n-s resol:  1
top:        1.000000000000000
bottom:     0.000000000000000
cols3:      1
rows3:      1
depths:     1
e-w resol3: 1
n-s resol3: 1
t-b resol:  1

GRASS GIS CMD session get projection info:

C:\Users\User>g.proj -p
XY location (unprojected)

tmszi avatar Dec 23 '23 11:12 tmszi