OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
825 stars 302 forks source link

[Bug] Profile tool fails in GUI #1242

Open cmbarton opened 3 years ago

cmbarton commented 3 years ago

Describe the bug I just compiled and installed GRASS 7.8.5. When I tried the GUI profile tool, it fails with the error message: "ERROR: option : <-> exists. To overwrite, use the --overwrite flag. A blank profile window is generated.

To Reproduce Display "elevation" from the SC demo data set. Launch the profile tool Make a rubber band line to create a profile

System description (please complete the following information):

python3 -c "import sys, wx; print(sys.version); print(wx.version())" 3.8.6 | packaged by conda-forge | (default, Nov 27 2020, 19:17:44) [Clang 11.0.0 ] 4.0.7.post2 osx-cocoa (phoenix) wxWidgets 3.0.5 GRASS 7.8.5 (nc_spm_08_grass7)

tmszi commented 3 years ago

Affected with this error ERROR: option : <-> exists. To overwrite, use the --overwrite flag are r.profile, r.horizon, r.out.bin module. Bug occur if output option is output=- (stdout).

Problematic is line where checking if file exist (stdout) G_parser(), check_overwrite() function.

cmbarton commented 3 years ago

Affected with this error ERROR: option : <-> exists. To overwrite, use the --overwrite flag are r.profile, r.horizon, r.out.bin module. Bug occur if output option is output=- (stdout).

Problematic is line where checking if file exist (stdout) G_parser(), check_overwrite() function.

This is not working in version 7.9 dev either.

tmszi commented 3 years ago

Could @cmbarton check if this file file /home/<your_user>/- exist please? After deleting it the wxGUI Profile tool, r.profile, r.horizon, ~r.out.bin~ module works properly or apply this PR #1245.

In my use case:

GRASS nc_basic_spm_grass7/PERMANENT:~ > file /home/tomas/-
/home/tomas/-: ASCII text
GRASS nc_basic_spm_grass7/PERMANENT:~ > cat /home/tomas/-
3686940b14a609e85ca7bf2f8daa78e5194e267c
cmbarton commented 3 years ago

I will check

cmbarton commented 3 years ago

I did. When I deleted it, profile worked. Interestingly, the file dated back to 2018. No idea what created it.