阅读背景:

异常后如何继续?蟒蛇

来源:互联网 

I have a for loop that's parsing data being pulled from Yelp. Sometimes, I get the following exception due to some of the business names:'ascii' codec can't encode character u'\xf1' in position 3: ordinal not in range(128). Since this is pretty common, I would like my for loop to continue iterating after this exception skipping the line that's throwing the exception. What would be the best way? For some reason using continue doesn't work for me.I have a for loop that's parsing data being pul




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: