Re: UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7'

Discussion in 'Python' started by Chris Rebert, Jul 16, 2009.

  1. Chris Rebert

    Chris Rebert Guest

    On Wed, Jul 15, 2009 at 9:34 PM, akhil1988<> wrote:
    >
    > Hi!
    >
    > Can anyone please help me getting rid of this error:
    > UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position
    > 13: ordinal not in range(128)
    >
    > I am not a python programmer (though intend to start learning this wonderful
    > language), I am just using a python script.
    >
    > After doing some search, I found that 0xb7 is a 'middle dot character' that
    > is not interpreted by the python.
    > Even after inserting text = text.replace('\u00b7', '') in the script, the
    > problem still persists.
    >
    > Can anyone please tell me the easiest way to get rid of this?


    We'll need the full error traceback. The error message at the end is
    just not enough information.
    As to fixing it, google for "UnicodeEncodeError". You should find
    about a million mailinglist threads on it.

    Cheers,
    Chris
    --
    http://blog.rebertia.com
     
    Chris Rebert, Jul 16, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Francach
    Replies:
    2
    Views:
    36,616
    Diez B. Roggisch
    Nov 6, 2005
  2. akhil1988
    Replies:
    0
    Views:
    925
    akhil1988
    Jul 16, 2009
  3. akhil1988
    Replies:
    16
    Views:
    1,274
    akhil1988
    Jul 18, 2009
  4. Chris Rebert
    Replies:
    0
    Views:
    795
    Chris Rebert
    Jul 16, 2009
  5. akhil1988
    Replies:
    1
    Views:
    1,640
    Piet van Oostrum
    Jul 16, 2009
Loading...

Share This Page