[GRASS-dev] [GRASS GIS] #365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
For some days now GRASS 6.4 SVN has been printing a following warning o
the terminal, once a second or so:

** (python:3840): WARNING **: IPP request failed with status 1280

This makes using CLI troublesome.

Once I close wxGUI the wrning is gone.

Debian testing amd64.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-64
-----------------------+----------------------------------------------------
Comment (by glynn):

Replying to [ticket:365 msieczka]:
> For some days now GRASS 6.4 SVN has been printing a following warning o
the terminal, once a second or so:
>
> ** (python:3840): WARNING **: IPP request failed with status 1280

Googling for "IPP request failed" indicates that this is generated by
libgnomeprint polling CUPS when no printer is available.

It might be possible to ensure that this doesn't occur if you don't use
any features related to printing. Unfortunately, once you do, there isn't
much that we can do about it. glib provides a mechanism to override the
default logging handler, but neither wxWidgets nor wxPython appear to use
this or expose it to applications.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Changes (by msieczka):

  * cpu: x86-64 => All

Comment:

Replying to [comment:1 glynn]:

> Googling for "IPP request failed" indicates that this is generated by
libgnomeprint polling
> CUPS when no printer is available.

In my case the culprit seems to be that CUPS was disabled (as I don't
usually use any printers anyway). Once I turned CUPS service on, in spite
of no printers configured, the warning is gone.

> It might be possible to ensure that this doesn't occur if you don't use
any features related
> to printing. Unfortunately, once you do, there isn't much that we can do
about it. glib
> provides a mechanism to override the default logging handler, but
neither wxWidgets nor
> wxPython appear to use this or expose it to applications.

So basically when CUPS is disabled/not installed on a machine, GRASS
terminal will always be borked like this?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

Replying to [comment:2 msieczka]:

> So basically when CUPS is disabled/not installed on a machine, GRASS
terminal will always be borked like this?

Modifying !PrintOptions to create the wx.!PrintData object on first use
may mean that the problems won't arise unless you select any of the items
from the print menu on the map display, histogram or profile windows
(presumably, you're not likely to select those items if your system isn't
set up for printing).

You can test whether this is the case by commenting out the lines:

{{{
         self.printData = wx.PrintData()
         self.printData.SetPaperId(wx.PAPER_LETTER)
         self.printData.SetPrintMode(wx.PRINT_MODE_PRINTER)
}}}

in !PrintOptions.!__init!__ in
$GISBASE/etc/wxpython/gui_modules/disp_print.py.

I can't test it, as my version of wxWidgets is built without Gnome
support, so I don't get these warnings.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Comment (by msieczka):

Replying to [comment:3 glynn]:

> You can test whether this is the case by commenting out the lines:
>
> {{{
> self.printData = wx.PrintData()
> self.printData.SetPaperId(wx.PAPER_LETTER)
> self.printData.SetPrintMode(wx.PRINT_MODE_PRINTER)
> }}}
>
> in !PrintOptions.!__init!__ in
$GISBASE/etc/wxpython/gui_modules/disp_print.py.

Doing the above prevents WARNINGs, but also completely disables all
printing functionality. Choosing any tool under "Print display" has no
effect.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

Replying to [comment:4 msieczka]:

> Doing the above prevents WARNINGs, but also completely disables all
printing functionality. Choosing any tool under "Print display" has no
effect.

That's to be expected; it wasn't intended as a fix, just a way to confirm
the source of the warnings.

I'll commit a proper fix. However, once you choose any of the print
related menu options, there doesn't appear to be much that we can do about
any warnings that libgnomeprint decides to generate.

In particular, the wx.PrintData() object has to be persistent so that any
settings made via the "Page Setup" are used for printing. Hmm; I suppose
that we could add a "Reset" option to remove any references to the
wx.PrintData() object, although that won't help if wx keeps its print-
handling thread running anyhow.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

Can you try the attached patch?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Comment (by msieczka):

Replying to [comment:6 glynn]:
>
> Can you try the attached patch?

It helps. No warnings until I select a tool from "Print display". Once I
do however, the warnings start cropping in 5 seconds intervals.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

Replying to [comment:7 msieczka]:

> > Can you try the attached patch?
>
> It helps. No warnings until I select a tool from "Print display". Once I
do however, the warnings start cropping in 5 seconds intervals.

Do they stop if you select the "Reset" option?

In any case, that's all that we can do. Committed as r34380 (7.0).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Comment (by msieczka):

Replying to [comment:8 glynn]:

> Do they stop if you select the "Reset" option?

Nope.

> In any case, that's all that we can do. Committed as r34380 (7.0).

Much better anyway. Thanks!

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):

Replying to [comment:9 msieczka]:

> > Do they stop if you select the "Reset" option?
>
> Nope.

In that case, I'll remove the Reset option, as it serves no purpose.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Comment (by cmbarton):

I think we should change this to fixed (as much as possible) or wontfix,
because it seems that nothing else can be done. It only arises if CUPS is
disabled with Gnome printing it seems. It should also be merged with the
couple of other reports about CUPS and Gnome printing, as they all seem
related.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#365: wxGUI: ** (python:3840): WARNING **: IPP request failed with status 1280
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: wontfix | Keywords:
  Platform: Linux | Cpu: All
-----------------------+----------------------------------------------------
Changes (by cmbarton):

  * status: new => closed
  * resolution: => wontfix

Comment:

No one has responded since last December. Changing to wontfix because
there is nothing we can do in the wxPython GUI to improve this further.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/365#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>