REMitchell / python-scraping

Code samples from the book Web Scraping with Python http://shop.oreilly.com/product/0636920034391.do
4.42k stars 2.48k forks source link

UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 83: ordinal not in range(128) #39

Open maokitty opened 7 years ago

maokitty commented 7 years ago

I try to run code 'chapter6/6-readDocx.py' , error is blow: UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 83: ordinal not in range(128)

it look like the error line is 'xml_content.decode('utf-8')'

how can i fix it?help me please