[Tutor] Error with incorrect encoding

Oleg Oltar oltarasenko at gmail.com
Tue Apr 15 17:20:53 CEST 2008

I am trying to parse an html page. Have following error while doing that

 src = sel.get_html_source()
        links = re.findall(r'<a class="al4"[^<]*</a>', src)
        for link in links:
            print link

ERROR: test_new (__main__.NewTest)
Traceback (most recent call last):
  File "<stdin>", line 19, in test_new
UnicodeEncode    Error: 'ascii' codec can't encode character u'\xae' in
position 90: ordinal not in range(128)

Ran 1 test in 6.345s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080415/91c85a1a/attachment.htm 

More information about the Tutor mailing list