Ascii codec can't encode character


I'm using a Python script which returns the currently playing/on air DJs on the BBC at the moment. Has worked well for months. Now I find it actually fails if there's an apostrophe in the output. Can I fix this somehow?

The error, from pythonshell in is

exit code: 1, Traceback (most recent call last):
  File "", line 17, in <module>
    print g_data[5].text
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 7: ordinal not in range(128)
Clara Amfo
Radio 1 Dance
Ken Bruce
Essential Classics
Hip-hop’s Laughing Stock
Desert Island Discs Revisited
The Emma Barnett Show
Mary Anne Hobbs


Solved this I think by using the exec node instead.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.