python 和 Sublime text 2 的奇怪错误
Strange error with python and Sublime text 2
我正在尝试在 Python 中编写代码以从蓝牙读取数据。到目前为止,这是我的代码:
import serial
arduinoData = serial.Serial('com7', 9600)
while True:
while(arduinoData.inWaiting() == 0): # Si no hay datos, se espera
print "There is no data"
pass
arduinoString = arduinoData.readline()
print "This is the Data: "
print arduinoString
在我的第一次尝试中,我遇到了这个错误:
所以我搜索了这个错误,我发现了这个:
UTF-8 and SublimeText
按照答案说的做了,这次我得到了:
这是什么意思?这是解码错误还是其他类型的错误?
希望你能帮助我。
[SOH]
是 Sublime 用于 ASCII 0x01 的文本表示,即 Start of Heading
控制字符。您的代码没有任何问题 - 这就是通过连接发送的内容。
我正在尝试在 Python 中编写代码以从蓝牙读取数据。到目前为止,这是我的代码:
import serial
arduinoData = serial.Serial('com7', 9600)
while True:
while(arduinoData.inWaiting() == 0): # Si no hay datos, se espera
print "There is no data"
pass
arduinoString = arduinoData.readline()
print "This is the Data: "
print arduinoString
在我的第一次尝试中,我遇到了这个错误:
所以我搜索了这个错误,我发现了这个: UTF-8 and SublimeText
按照答案说的做了,这次我得到了:
这是什么意思?这是解码错误还是其他类型的错误?
希望你能帮助我。
[SOH]
是 Sublime 用于 ASCII 0x01 的文本表示,即 Start of Heading
控制字符。您的代码没有任何问题 - 这就是通过连接发送的内容。