Opened 8 years ago

Closed 7 years ago

#1634 closed defect (fixed)

wingrass7: i.spectral -error

Reported by: hellik Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Imagery Version: unspecified
Keywords: wingrass Cc:
CPU: x86-32 Platform: MSWindows Vista

Description

tested with osgeo4w-wingrass7, nc-sample dataset:

gnuplot is in the path:

_path=C:\OSGeo4W\apps\Python27\Scripts
OSGEO4W home is C:\OSGeo4W
Der Befehl "manpath" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Cleaning up temporary files...
Starting GRASS GIS...
WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows
         nicht m÷glich.

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
       \____/_/ |_/_/  |_/____/____/   \____/___//____/

Welcome to GRASS 7.0.svn??GRASS homepage:                          http://grass.
osgeo.org
This version running through:            shell (C:\OSGeo4W\apps\msys\bin\sh.exe)

Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
If required, restart the GUI with:       g.gui wxpython
When ready to quit enter:                exit

GRASS 7.0.svn> gnuplot

        G N U P L O T
        Version 4.6 patchlevel 0    last modified 2012-03-04
        Build System: MS-Windows 32 bit

        Copyright (C) 1986-1993, 1998, 2004, 2007-2012
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

gnuplot changed the codepage of this console from 850 to 1252 to
match the graph window. Some characters might only display correctly
if you change the font to a non-raster type.

Terminal type set to 'wxt'
gnuplot> exit
GRASS 7.0.svn>

adapted example from the manual: http://grass.osgeo.org/grass70/manuals/html70_user/i.spectral.html

GRASS 7.0.svn> i.spectral.py raster=$LIST east_north=637502.25,221744.25
Traceback (most recent call last):
  File "C:/OSGeo4W/apps/grass/grass-7.0.svn/scripts/i.spectral.py", line 210, in
 <module>
    main()
  File "C:/OSGeo4W/apps/grass/grass-7.0.svn/scripts/i.spectral.py", line 205, in
 main
    draw_linegraph(what)
  File "C:/OSGeo4W/apps/grass/grass-7.0.svn/scripts/i.spectral.py", line 127, in
 draw_linegraph
    xf = file(xfile, 'w')
IOError: [Errno 13] Permission denied: 'data_x'
GRASS 7.0.svn> i.spectral.py -g raster=$LIST east_north=637502.25,221744.25
Traceback (most recent call last):
  File "C:/OSGeo4W/apps/grass/grass-7.0.svn/scripts/i.spectral.py", line 210, in
 <module>
    main()
  File "C:/OSGeo4W/apps/grass/grass-7.0.svn/scripts/i.spectral.py", line 203, in
 main
    draw_gnuplot(what, xlabels, output, label)
  File "C:/OSGeo4W/apps/grass/grass-7.0.svn/scripts/i.spectral.py", line 76, in
draw_gnuplot
    outf = file(outfile, 'w')
IOError: [Errno 13] Permission denied: 'data_0'
GRASS 7.0.svn>

Helmut

Change History (3)

comment:1 Changed 7 years ago by neteler

The fix will be rather trivial: The command currently writes into a non-accessible directory. Solution:

grass.tempdir() and os.path.join() must be used for the tmp files.

comment:2 in reply to:  1 Changed 7 years ago by lucadelu

Replying to neteler:

The fix will be rather trivial: The command currently writes into a non-accessible directory. Solution:

grass.tempdir() and os.path.join() must be used for the tmp files.

I fixed this problem, so this ticket should be close. but i.spectral doesn't work yet due to a bug in d.linegraph, please see #1842

comment:3 Changed 7 years ago by neteler

Resolution: fixed
Status: newclosed

Closing, missing part is in ticket #1842

Note: See TracTickets for help on using tickets.