Traceback (most recent call last): File "/Users/jmeyer2k/Downloads/nxt-python-2-1.2.0/examples/ mary.py", line 17, in <module> mx = nxt.Motor(b, nxt.PORT_A) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/nxt/motor.py", line 226, in __init__ self._read_state() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/nxt/motor.py", line 248, in _read_state values = self.brick.get_output_state(self.port) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/nxt/brick.py", line 29, in poll igram = Telegram(opcode=opcode, pkt=self.sock.recv()) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/nxt/bluesock.py", line 63, in recv data = self.sock.recv(2) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/nxt/lightblueglue.py", line 46, in recv return self._sock.recv( numbytes ) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/lightblue/_bluetoothsockets.py", line 470, in recv return self.__incomingdata.read(bufsize) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/lightblue/_bluetoothsockets.py", line 150, in read self._build_str() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/lightblue/_bluetoothsockets.py", line 135, in _build_str new_string = "".join(self.l_buffer) TypeError: sequence item 0: expected string, memory view found
Here is my code:
mx = nxt.Motor(b, nxt.PORT_A) my = nxt.Motor(b, nxt.PORT_B) motors =
def turnmotor(m, power, degrees): m.turn(power, degrees)
Log in to post a comment.
Traceback (most recent call last):
File "/Users/jmeyer2k/Downloads/nxt-python-2-1.2.0/examples/
mary.py", line 17, in <module>
mx = nxt.Motor(b, nxt.PORT_A)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/site-packages/nxt/motor.py", line 226, in __init__
self._read_state()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/site-packages/nxt/motor.py", line 248, in _read_state
values = self.brick.get_output_state(self.port)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/site-packages/nxt/brick.py", line 29, in poll
igram = Telegram(opcode=opcode, pkt=self.sock.recv())
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/site-packages/nxt/bluesock.py", line 63, in recv
data = self.sock.recv(2)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/site-packages/nxt/lightblueglue.py", line 46, in recv
return self._sock.recv( numbytes )
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/site-packages/lightblue/_bluetoothsockets.py", line 470, in
recv
return self.__incomingdata.read(bufsize)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/site-packages/lightblue/_bluetoothsockets.py", line 150, in
read
self._build_str()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/site-packages/lightblue/_bluetoothsockets.py", line 135, in
_build_str
new_string = "".join(self.l_buffer)
TypeError: sequence item 0: expected string, memory view found
Here is my code:
mx = nxt.Motor(b, nxt.PORT_A)
my = nxt.Motor(b, nxt.PORT_B)
motors =
def turnmotor(m, power, degrees):
m.turn(power, degrees)