[Qgis-user] plugin Statistic dont work

Betina Zucchino bzucchino at yahoo.com.ar
Fri Apr 22 15:47:59 PDT 2011


Hello Goyo, Thanks so much!
It worked!
I did what you wrote, because updating osgeo4w didnt work.
I´ve tried more than once and there were an error whith Python.

Betina

--- El vie 22-abr-11, Goyo <goyodiaz at gmail.com> escribió:

De: Goyo <goyodiaz at gmail.com>
Asunto: Re: [Qgis-user] plugin Statistic dont work
Para: "Betina Zucchino" <bzucchino at yahoo.com.ar>
Cc: "qgis-user" <qgis-user at lists.osgeo.org>
Fecha: viernes, 22 de abril de 2011, 18:57

Hola Bettina,

the bug is now closed as fixed (thanks, Jürgen) so updating osgeo4w
should be enough.

If you used the standalone installer I don't know if you can update.
If you don't then do this:

1. Open C:\OSGeo4W\apps\Python25\lib\site-packages\matplotlib\backends\backend_agg.py
in notepad or any text editor. The exact path can vary if you
installed in a custom directory.

2. Look for this code (it should be lines 319, 320 and 321):

try: self._lastKey, self.renderer
except AttributeError: need_new_renderer = True
else:  need_new_renderer = (self._lastKey != key)

3. Change the second line (320) to this:
except (AttributeError, TypeError): need_new_renderer = True

4. Save changes and try again.

You can make a backup of the file before making any changes, just for
safety. But now that the bug is fixed updating osgeo4w is the right
way to go.

Goyo

2011/4/22 Betina Zucchino <bzucchino at yahoo.com.ar>
>
> Hola Goyo:
> Hablas en español?
> Te agradezco lo que me respondiste. Pero no manejo Python y no se que es lo que tendría que hacer con eso que figura en la página... Te pido disculpas, soy usuaria de qgis, pero sin idea de programación.
>
> Lo que alcancé a hacer es abrir una ventana de python 2.7 y pegar todas las sentencias que figuran en la pagina sin saber cómo continuar. Hice Debug...
>
> En fin,  muchas gracias igualmente.
>
>
> Betina
>
> --- El vie 22-abr-11, Goyo <goyodiaz at gmail.com> escribió:
>
> De: Goyo <goyodiaz at gmail.com>
> Asunto: Re: [Qgis-user] plugin Statistic dont work
> Para: "Betina Zucchino" <bzucchino at yahoo.com.ar>
> Cc: qgis-user at lists.osgeo.org
> Fecha: viernes, 22 de abril de 2011, 17:00
>
> 2011/4/22 Betina Zucchino <bzucchino at yahoo.com.ar>
> >
> > Traceback (most recent call last):
> >   File "C:\OSGeo4W\apps\Python25\lib\site-packages\matplotlib\backends\backend_qt4.py", line 168, in resizeEvent
> >     self.draw()
> >   File "C:\OSGeo4W\apps\Python25\lib\site-packages\matplotlib\backends\backend_qt4agg.py", line 130, in draw
> >     FigureCanvasAgg.draw(self)
> >   File "C:\OSGeo4W\apps\Python25\lib\site-packages\matplotlib\backends\backend_agg.py", line 313, in draw
> >     self.renderer = self.get_renderer()
> >   File "C:\OSGeo4W\apps\Python25\lib\site-packages\matplotlib\backends\backend_agg.py", line 319, in get_renderer
> >     try: self._lastKey, self.renderer
> > TypeError: 'sip.methoddescriptor' object is not callable
>
> There is an incompatibility between python and sip versions in osgeo4w
> affecting the qt4agg backend in matplotlib. I filed a bug about this
> some time ago[1]. I had to patch matplotlib in order to get the qt4agg
> backend working in osgeo4w, see the bug report for details.
>
> Goyo
>
> [1] http://trac.osgeo.org/osgeo4w/ticket/213
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110422/509ba455/attachment.html>


More information about the Qgis-user mailing list