Opened 7 years ago

Last modified 6 years ago

#3552 new defect

i.spectral fails due to missing monitor

Reported by: marisn Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Imagery Version: svn-trunk
Keywords: i.spectral Cc:
CPU: Unspecified Platform: Unspecified

Description

From the code of i.spectral I could not figure out what should happen when gnuplot is absent – should it plot on screen? Into a file? In either case, code needs enhancements to handle corner cases (i.e. output file not provided or is not writeable).

At the moment it doesn't do any of those things:

ERROR: Neither MONITOR (managed by d.mon command) nor GRASS_RENDER_IMMEDIATE (used for direct rendering) defined
Traceback (most recent call last):
  File "/home/marisn/soft/grass7_trunk/dist.x86_64-pc-linux-
gnu/scripts/i.spectral", line 273, in <module>
    main()
  File "/home/marisn/soft/grass7_trunk/dist.x86_64-pc-linux-
gnu/scripts/i.spectral", line 268, in main
    draw_linegraph(what)
  File "/home/marisn/soft/grass7_trunk/dist.x86_64-pc-linux-
gnu/scripts/i.spectral", line 200, in draw_linegraph
    x_title=_("Bands"), y_title=_("DN Value"))
  File "/home/marisn/soft/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/script/core.py", line 421, in
run_command
    return handle_errors(returncode, returncode, args,
kwargs)
  File "/home/marisn/soft/grass7_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/script/core.py", line 332, in
handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None
['d.linegraph', 'x_title=Bands', 'x_file=/home/marisn/data/G
RASS_DB/LV_UTM34V/piemers/.tmp/seda/1232.0/data_x', 'y_file=
/home/marisn/data/GRASS_DB/LV_UTM34V/piemers/.tmp/seda/1232.
0/data_y_0', 'y_title=DN Value', 'title=Spectral
signatures', 'y_color=red'] ended with error
Process ended with non-zero return code 1. See errors in the
(error) output.

Change History (3)

in reply to:  description comment:1 by neteler, 6 years ago

Replying to marisn:

From the code of i.spectral I could not figure out what should happen when gnuplot is absent – should it plot on screen? Into a file? In either case, code needs enhancements to handle corner cases (i.e. output file not provided or is not writeable).

I suppose that the default should be output into a PNG file.

comment:2 by martinl, 6 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:3 by martinl, 6 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.