Skip to content

Error trying to connect to Stepper using python #2

@packetfocus

Description

@packetfocus

New install. I configured the WS to use station wireless, and verified I can connect through the website and run commands on my nema 17 stepper.

Having problems running python commands. Using python 3.7, and imported the library in the directory.

Also changed the host name using IP in the py code.

C:\code\WifiStepper2>python ws.py
Traceback (most recent call last):
File "ws.py", line 12, in
MOTOR.connect()
File "C:\code\WifiStepper2\goodrobotics.py", line 452, in connect
return self.__comm.connect()
File "C:\code\WifiStepper2\goodrobotics.py", line 211, in connect
return self.cmd_ping(0, 0)
File "C:\code\WifiStepper2\goodrobotics.py", line 228, in cmd_ping
return self._waitreply(self._send(self._OPCODE_PING, self._SUBCODE_CMD, target, queue), self._SUBCODE_ACK)
File "C:\code\WifiStepper2\goodrobotics.py", line 367, in _send
self.sock.send(self._preamble(self._TYPE_STD) + self._header(opcode, subcode, target, queue, packetid, len(data)) + data)
TypeError: can't concat str to bytes

C:\code\WifiStepper2>python --version
Python 3.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions