Hello All,
Starting to move to Python for my team (I’m the programming mentor). I use it (somewhat) professionally, so am fairly conversant in it. However, I’m not much of an eclipse user (doing it only for the kids), preferring emacs in
the professional world.
I installed PyDev into Eclipse, and manually created the Command framework based on https://github.com/robotpy/examples/tree/master/command-based - when I say manually created, I created folders manually, and added new files into these folders manually. This results in a folder structure that looks like:
> pybot
>> Commands
>>>init.py
>>> AutoCommand.py
>>> setspeed.py
>>> timedMotor.py
>> Robot
>>> robot.py
>>> robotmap.py
>> Subsystems
>>> Motor.py
Eclipse thinks all is OK (no red flags indicating syntax problems). I’m able to do install-robotpy deploy --skip-tests to get the code transferred to the rio.
When I do install-robotpy run, I get:
File “/home/lvuser/py/robot.py”, line 7, in <module>
from Subsystems import Motor
ModuleNotFoundError: No module named ‘Subsystems’
I’m not sure what to do (if anything) with PYTHONPATH, and the README.md doesn’t make any references to the variable. Or, is there some other configuration thing I’ve not set up properly.
I’ve also tried running this from the command line on the driverstation laptop - robot.py --help - and I get the same error. I’ve tried setting PYTHONPATH to the project directory, to no avail.
Thanks for any help on this…