I made some code using Pydev, python.
codes worked well and resulted good.
but when I run it on the raspberryPi, errors occurred and it didn't work well. Of course, I couldn't get proper results..
print ser.readline()
AttributeError: 'int' object has no attribute 'readline'
File "gpste.py", line 103, in sav_loc
line = str(location.address)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128)
what's the problem??
and when i insert Ctrl+c, it didn't work. why and how can I stop the program in the middle of process??
You are having two problems here.
It seems like you overloaded
ser
with an integer. For details we need more code.location.address
does not have the right encoding. Again to say more we would need the code and content oflocation.address
.