RobotPy No Robot Code


Everything is deployed successfully, but the comm light on the roboRIO is solid red. The DS is reading comms, but no robot code.

   #!/usr/bin/env python3

   import wpilib
   from import DifferentialDrive
   import ctre

   class MyRobot(wpilib.TimedRobot):
       def robotInit(self):
           self.left = ctre.WPI_TalonSRX(0)
           self.right = ctre.WPI_TalonSRX(1)
           self.myRobot = DifferentialDrive(self.left, self.right)
           self.stick = wpilib.Joystick(0)
       def autonomousInit(self):
       def autonomousPeriodic(self):
       def teleopPeriodic(self):
           self.myRobot.arcadeDrive(self.stick.getRawAxis(0), self.stick.getRawAxis(1))
       def testPeriodic(self):

    if __name__ == "__main__":


And what error message does it show in netconsole?


The only error is “Connecting to… :(“


Sounds like pynetconsole isn’t connecting. You can view the netconsole output via the driver station also.


If I am not mistaken, is the ip for the usb connection to the Rio, not the ethernet (or wifi).

~Mr. R^2


@robo4630dragons did you figure out what your issue was?


We just had this issue Saturday. The kids had deployed the code, but hadn’t deployed the CTRE module packages. I assume the code was failing on the import of ctre, but once we deployed the packages to the RoboRio, it ran.


It could not find the ctre module because it wasn’t found in the robotpy installer packages. So I used the command “py -3 download-opkg python37-robotpy-ctre” instead of “py -3 download-opkg python36-robotpy-ctre” and it worked.