_port

General discussion of the MCP motion controller product line
Post Reply
fausto.tromba
Posts: 30
Joined: Wed Jul 31, 2019 7:24 am

_port

Post by fausto.tromba » Wed Aug 19, 2020 8:03 am

During a crash test, we unplug on purpose the encoder to check if the software stop the motor.
After it, and other tests, I don't manage to communicate with the Motordriver anymore with alway the same problem. Lunching roboclaw_readversion.py

Code: Select all

Traceback (most recent call last):
  File "/home/pi/Documents/MCP236_py3/Roboclaw_testProgram/roboclaw_readversion.py", line 13, in <module>
    version = rc.ReadVersion(0x80)
  File "/home/pi/Documents/MCP236_py3/Roboclaw_testProgram/roboclaw_3.py", line 718, in ReadVersion
    self._port.flushInput()
AttributeError: 'Roboclaw' object has no attribute '_port'
Please help me to find out the problem

User avatar
Basicmicro Support
Posts: 1436
Joined: Thu Feb 26, 2015 9:45 pm

Re: _port

Post by Basicmicro Support » Wed Aug 19, 2020 8:30 am

_port is the internal variable that holds the open port pointer. If the Open fails you will get this error when you try to do anything else with the serial port since it wasn't opened.

Post Reply