Page 1 of 1

_port

Posted: Wed Aug 19, 2020 8:03 am
by fausto.tromba
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

Re: _port

Posted: Wed Aug 19, 2020 8:30 am
by Basicmicro Support
_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.