[Tutor] Assistance with UnicodeDecodeError

Dave Angel davea at davea.name
Sat Jan 31 23:44:57 CET 2015

On 01/31/2015 08:37 AM, J Mberia wrote:
> Hi,

Welcome to Python tutor.  Thanks for posting using text email, and for 
specifying both your Python version and Operating system.

> I am teaching myself programming in python and assistance with
> UnicodeDecodeError
> I am trying to scrap text from a website using Python 2.7 in windows 8 and
> i am getting this error *"**UnicodeDecodeError: 'charmap codec can't encode
> character u'\u2014 in position 11231 character maps to <undefined>"*
> *How do i resolve? Pls assist.*

You can start by posting the whole error message, including the stack 
trace.  Then you probably should include an appropriate segment of your 

The message means that you've got some invalid characters that you're 
trying to convert.  That can either be that the data is invalid, or that 
you're specifying the wrong encoding, directly or implicitly.


More information about the Tutor mailing list