Tommz
Tommz

Reputation: 3453

UnicodeDecodeError: 'ascii' codec can't decode byte ... in position ... ordinal not in range(128)

I've read topics with the similar question, but none of it fits my problems. I'm working in iPython notebook and I have the following chunk of code:

import scipy as sp
%pylab inline

When I try to run it, it fails on second line with the error in the title. Why is that?

Upvotes: 2

Views: 3464

Answers (1)

Yierith
Yierith

Reputation: 141

Because of the % before pylab i guess that you just have to define the encoding to utf8.


Like:

import sys  

reload(sys)  
sys.setdefaultencoding('utf8')

Upvotes: 5

Related Questions