Re: [Qgis-user] plugin Statistic dont work

2011-04-22 Thread Betina Zucchino
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  escribió:

De: Goyo 
Asunto: Re: [Qgis-user] plugin Statistic dont work
Para: "Betina Zucchino" 
Cc: "qgis-user" 
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 
>
> 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  escribió:
>
> De: Goyo 
> Asunto: Re: [Qgis-user] plugin Statistic dont work
> Para: "Betina Zucchino" 
> Cc: qgis-user@lists.osgeo.org
> Fecha: viernes, 22 de abril de 2011, 17:00
>
> 2011/4/22 Betina Zucchino 
> >
> > 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
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] plugin Statistic dont work

2011-04-22 Thread Goyo
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 
>
> 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  escribió:
>
> De: Goyo 
> Asunto: Re: [Qgis-user] plugin Statistic dont work
> Para: "Betina Zucchino" 
> Cc: qgis-user@lists.osgeo.org
> Fecha: viernes, 22 de abril de 2011, 17:00
>
> 2011/4/22 Betina Zucchino 
> >
> > 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
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] plugin Statistic dont work

2011-04-22 Thread Goyo
2011/4/22 Betina Zucchino 
>
> 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
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] plugin Statistic dont work

2011-04-22 Thread John Callahan
I can confirm the same error using qgis-dev package from OSGeoW.  I'm on
Windows XP x64.

Python version:
2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]

QGIS version:
1.7.0-Wroclaw Wroclaw, 15786M

- John



On Fri, Apr 22, 2011 at 12:23 PM, Betina Zucchino wrote:

> Hello:
>
> i need working whith Statistic for vector layer and the plugin crash every
> time.
> I dont know what is the problem.
> If someone could help me
> I pasted the error messege here below
> THANKs
> Betina
>
> Ha ocurrido un error mientras se ejecutaba el código de Python:
>
> 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
>
> Versión de Python:
> 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
>
>
> Versión de QGIS:
> 1.6.0-Copiapo Copiapo, exported
>
> Ruta de Python: ['C:\\Documents and
> Settings\\tinpy\\.qgis\\python\\plugins\\GeoCoding',
> 'C:/OSGeo4W/apps/qgis/./python', 'C:/Documents and
> Settings/tinpy/.qgis/python', 'C:/Documents and
> Settings/tinpy/.qgis/python/plugins',
> 'C:/OSGeo4W/apps/qgis/./python/plugins', 'C:\\Archivos de
> programa\\ArcGIS\\bin', 'C:\\WINDOWS\\system32\\python25.zip',
> 'C:\\OSGeo4W\\apps\\Python25\\DLLs', 'C:\\OSGeo4W\\apps\\Python25\\lib',
> 'C:\\OSGeo4W\\apps\\Python25\\lib\\plat-win',
> 'C:\\OSGeo4W\\apps\\Python25\\lib\\lib-tk', 'C:\\OSGeo4W\\apps\\qgis\\bin',
> 'C:\\OSGeo4W\\apps\\Python25',
> 'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages',
> 'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages\\win32',
> 'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages\\win32\\lib',
> 'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages\\Pythonwin',
> 'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages\\wx-2.8-msw-unicode',
> '~/.qgis/python', 'C:\\Documents and
> Settings\\tinpy\\.qgis\\python\\plugins\\fTools\\tools', 'C:\\Documents and
> Settings\\tinpy\\.qgis\\python\\plugins\\mmqgis/forms', 'D:/CumPARTIDOS/NO
> BORRAR/IPAP-2011/SIG-N2-2011/M04/A01 - Promotores de salud']
>
> ---
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] plugin Statistic dont work

2011-04-22 Thread Betina Zucchino
Hello:

i need working whith Statistic for vector layer and the plugin crash every time.
I dont know what is the problem.
If someone could help me
I pasted the error messege here below
THANKs
Betina

Ha ocurrido un error mientras se ejecutaba el código de Python:

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

Versión de Python:
2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]


Versión de QGIS:
1.6.0-Copiapo Copiapo, exported

Ruta de Python: ['C:\\Documents and 
Settings\\tinpy\\.qgis\\python\\plugins\\GeoCoding', 
'C:/OSGeo4W/apps/qgis/./python', 'C:/Documents and 
Settings/tinpy/.qgis/python', 'C:/Documents and 
Settings/tinpy/.qgis/python/plugins', 'C:/OSGeo4W/apps/qgis/./python/plugins', 
'C:\\Archivos de programa\\ArcGIS\\bin', 'C:\\WINDOWS\\system32\\python25.zip', 
'C:\\OSGeo4W\\apps\\Python25\\DLLs', 'C:\\OSGeo4W\\apps\\Python25\\lib', 
'C:\\OSGeo4W\\apps\\Python25\\lib\\plat-win', 
'C:\\OSGeo4W\\apps\\Python25\\lib\\lib-tk', 'C:\\OSGeo4W\\apps\\qgis\\bin', 
'C:\\OSGeo4W\\apps\\Python25', 
'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages', 
'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages\\win32', 
'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages\\win32\\lib', 
'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages\\Pythonwin', 
'C:\\OSGeo4W\\apps\\Python25\\lib\\site-packages\\wx-2.8-msw-unicode', 
'~/.qgis/python', 'C:\\Documents and
 Settings\\tinpy\\.qgis\\python\\plugins\\fTools\\tools', 'C:\\Documents and 
Settings\\tinpy\\.qgis\\python\\plugins\\mmqgis/forms', 'D:/CumPARTIDOS/NO 
BORRAR/IPAP-2011/SIG-N2-2011/M04/A01 - Promotores de salud']

---___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user