Odd json encoding erro

2009-12-15 Thread Wells
I get this exception when decoding a certain JSON string: 'ascii' codec can't encode character u'\u2019' in position 8: ordinal not in range(128) The JSON data in question: http://mlb.com/lookup/json/named.player_info.bam?sport_code=%27mlb%27player_id=%27489002%27 It's in the 'high_school'

Re: Odd json encoding erro

2009-12-15 Thread Chris Rebert
On Tue, Dec 15, 2009 at 2:03 PM, Wells thewellsoli...@gmail.com wrote: I get this exception when decoding a certain JSON string: 'ascii' codec can't encode character u'\u2019' in position 8: ordinal not in range(128) The JSON data in question:

Re: Odd json encoding erro

2009-12-15 Thread Intchanter / Daniel Fackrell
On Dec 15, 3:03 pm, Wells thewellsoli...@gmail.com wrote: I get this exception when decoding a certain JSON string: 'ascii' codec can't encode character u'\u2019' in position 8: ordinal not in range(128) The JSON data in question:

Re: Odd json encoding erro

2009-12-15 Thread Wells
Sorry- more detail- the actual problem is an exception thrown when running str() on the value, like so: a = u'St. Paul\u2019s School For Boys (MN) HS' print str(a) Traceback (most recent call last): File stdin, line 1, in module UnicodeEncodeError: 'ascii' codec can't encode character

Re: Odd json encoding erro

2009-12-15 Thread Chris Rebert
On Tue, Dec 15, 2009 at 3:04 PM, Wells thewellsoli...@gmail.com wrote: Sorry- more detail- the actual problem is an exception thrown when running str() on the value, like so: a = u'St. Paul\u2019s School For Boys (MN) HS' print str(a) Traceback (most recent call last):  File stdin, line 1,