python 2.7 and pyserial issue - no _port
I'm restricted to python 2.7 for now. Have some serial hardware (a Roboclaw motor controller) to interface to via USB. The manufacturer provided some simple python scripts.
When I run the basic script, it complains that AttributeError: Roboclaw instance has no attribute '_port'.
I've tried sudo apt-get install python-serial. No luck. Still same problem.
I tried sudo apt-get install python3-serial, just to see if compatible with 2.x. No luck.
What I wanted to do was blow away ALL python and re-install just what I need. But I read (?) that raspbian/debian uses python for package management?
Traceback (most recent call last): File "roboclaw_simplepwm.py", line
14, in rc.ForwardM1(address,32) #1/4 power forward File
647, in ForwardM1 return self._write1(address,self.Cmd.M1FORWARD,val)
line 311, in _write1 self._sendcommand(address,cmd) File
126, in _sendcommand self._port.write(chr(address)) **AttributeError:
Roboclaw instance has no attribute '_port'**
The Roboclaw device is seen (dmesg). Also I ran their very basic script which just does an open() and that script works.
dpkg --get-selections|grep python
I'm running Raspberry/Raspbian (I believe it's Stretch) from late last year.