Niente da fare.
Resiste. Ho provato anche le varianti consigliate nel link.
grazie cmq!

faber

Il giorno 12 aprile 2010 18.30, Riccardo Lemmi <ricca...@reflab.it> ha
scritto:

> On Monday 12 April 2010, Fabrizio Rota wrote:
> > metodo esterno.
> > tx
> > faber
>
> Dovrebbe bastare:
>  # -*- coding: utf-8 -*-
> nelle prima riga (http://www.python.org/dev/peps/pep-0263/)
>
>
> > Il giorno 12 aprile 2010 18.20, Riccardo Lemmi <ricca...@reflab.it> ha
> >
> > scritto:
> > > On Monday 12 April 2010, Fabrizio Rota wrote:
> > > > In uno script che usa beautifulsoup devo cercare il testo "Umidità"
> > > >
> > > > Con
> > > > umid_row = soup.find(text='Umidità:').findParent('tr')
> > > >
> > > > ho questo errore
> > > >
> > > > Exception TypeUnicodeDecodeErrorException Value'ascii' codec can't
> > > > decode byte 0xc3 in position 6: ordinal not in range(128)
> > > >
> > > > Cercando una scorciatoia ho provato con
> > > > umid_row = soup.find(text='Umidit\xc3\xa0:').findParent('tr')
> > > >
> > > >
> > > > ma ottengo lo stesso errore.
> > > >
> > > > Evidentemente da una parte usa la codifica ascii e dall'altra
> unicode,
> > > > ma non ne esco....
> > > >
> > > > Aiutino?
> > >
> > > Usa una stringa unicode e dichiara nello script il codec che stai
> usando
> > > (python script, metodo esterno o modulo?)
> > > --
> > > Riccardo Lemmi                           Email:   ricca...@reflab.it
> > > Reflab S.r.l. - Plone Design, Development and Consulting
> > > Phone: +39 349 4620820                         http://www.reflab.it
> > >
> > > _______________________________________________
> > > Plone-IT mailing list
> > > Plone-IT@lists.plone.org
> > > http://lists.plone.org/mailman/listinfo/plone-it
> > > http://www.nabble.com/Plone---Italy-f21728.html
>
>
>
> --
> Riccardo Lemmi                           Email:   ricca...@reflab.it
> Reflab S.r.l. - Plone Design, Development and Consulting
> Phone: +39 349 4620820                         http://www.reflab.it
>
> _______________________________________________
> Plone-IT mailing list
> Plone-IT@lists.plone.org
> http://lists.plone.org/mailman/listinfo/plone-it
> http://www.nabble.com/Plone---Italy-f21728.html
>



-- 
Fabrizio
--------------------
"Life is what happens to you while you're busy making other plans" - J.
Lennon
_______________________________________________
Plone-IT mailing list
Plone-IT@lists.plone.org
http://lists.plone.org/mailman/listinfo/plone-it
http://www.nabble.com/Plone---Italy-f21728.html

Rispondere a