python pydev and raspberryPi

484 views Asked by At

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??

1

There are 1 answers

0
Klaus D. On

You are having two problems here.

  1. It seems like you overloaded ser with an integer. For details we need more code.

  2. location.address does not have the right encoding. Again to say more we would need the code and content of location.address.