UnicodedecodeError ipython

0

Good, I'm trying to graph some data from an experiment and the terminal has not stopped giving me dislikes. I put the code here:

from matplotlib import *
squares1=[0.0,0.004,0.006,0.009,0.012,0.016,0.018,0.021] #desplazamiento eje x en metros
sq_volts1=[-61.9,-48.85,-31.72,-17.45,-1.157,18.4,36.4,53.95]#voltaje placas deflectoras voltios
p1=plot(sq_volts1,squares1, ".k", label="Datos experimentales")
a=polyfit(squares1, sq_volts1, 1)
p2=plot(squares1, a, "-k", label="Recta de ajuste")
ylim(-0.001,0.022)
title('Dependencia de x con el voltaje', color='k')
xlabel('Voltaje entre placas $\Delta$ [V]')
ylabel('Desplazamiento horizontal $\Delta$  [m]')
legend(loc='best')
grid()
show()
savefig('tubos1b.pdf')

The error that jumps me is:     ERROR: Internal Python error in the inspect module.     Below is the traceback from this internal error.

Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/IPython/core/ultratb.py", line 776, in structured_traceback
records = _fixed_getinnerframes(etb, context, tb_offset)
File "/usr/lib/python2.7/dist-packages/IPython/core/ultratb.py", line 230, in wrapped
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/core/ultratb.py", line 267, in _fixed_getinnerframes
if rname == '<ipython console>' or rname.endswith('<string>'):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 59: ordinal not in range(128)
Unfortunately, your original traceback can not be constructed.

Initially, the program was executed, then executed if it was shortened by p1, now it is not executed in any way. I use Python 2.7.12 and, mainly, I run all .py from iPython 2.4.1.

I have tried removing all the texts and, even so, I keep throwing the same mistake.

Thank you very much for your time and sorry if it is a trivial question, I have seen other solutions to this problem but I am unable to carry them out.

    
asked by sentefekoloko 12.01.2018 в 02:57
source

0 answers