Robotpy problem

We just installed Robotpy and deployed a simple TimedRobot robot.py script.

We are getting the following output after deploying:

PS C:\Users\Sparky384\Python Scripts> py -3 robot.py deploy --nc
14:08:06:729 INFO : wpilib : WPILib version 2021.3.1.0
14:08:06:730 INFO : wpilib : HAL version 2021.3.1.0
14:08:06:730 INFO : wpilib : Running with simulated HAL.
14:08:06:730 INFO : wpilib : robotpy-wpiutil version 2021.3.1.0
14:08:06:730 INFO : wpilib : robotpy-wpimath version 2021.3.1.0
14:08:06:731 INFO : wpilib : robotpy-rev version 2021.0.2
14:08:06:731 INFO : wpilib : robotpy-rev-color version 2021.1.2.0
14:08:06:731 INFO : wpilib : robotpy-navx version 2021.1.1
14:08:06:731 INFO : wpilib : robotpy-halsim-gui version 2021.3.1.0
14:08:06:731 INFO : wpilib : robotpy-ctre version 2021.2.2
14:08:06:731 INFO : wpilib : robotpy-commands-v2 version 2021.3.1.0
14:08:06:731 INFO : wpilib : pyntcore version 2021.3.1.0
14:08:06:733 INFO : robotpy.installer : Finding robot for team 384
14:08:07:921 INFO : robotpy.installer : → Robot is at roboRIO-384-FRC.local
14:08:07:922 INFO : robotpy.installer : Connecting to robot via SSH at roboRIO-384-FRC.local
14:08:11:479 INFO : paramiko.transport : Connected (version 2.0, client OpenSSH_7.6)
14:08:11:617 INFO : paramiko.transport : Auth banner: b’NI Linux Real-Time (run mode)\n\nLog in with your NI-Auth credentials.\n\n’
14:08:11:618 INFO : paramiko.transport : Authentication (password) successful!
RoboRIO has WPILib version 2021.3.1.0
14:08:12:298 INFO : paramiko.transport.sftp: [chan 5] Opened sftp connection (server version 3)
make /home/lvuser/py_new
robot.py → /home/lvuser/py_new/robot.py
14:08:12:307 INFO : paramiko.transport.sftp: [chan 5] sftp session closed.
Connecting to roboRIO-384-FRC.local:1741…14:08:17:314 INFO : deploy : Netconsole is listening…
OK
[4039.28] Traceback (most recent call last):
[4039.28] File “/home/lvuser/py/robot.py”, line 7, in
[4039.28] import wpilib
[4039.28] File “/usr/local/lib/python3.9/site-packages/wpilib/init.py”, line 1, in
[4039.28] from . import _init_wpilib
[4039.28] File “/usr/local/lib/python3.9/site-packages/wpilib/_init_wpilib.py”, line 8, in
[4039.28] import hal._init_wpiHal
[4039.28] File “/usr/local/lib/python3.9/site-packages/hal/init.py”, line 4, in
[4039.28] from . import _initialize
[4039.28] File “/usr/local/lib/python3.9/site-packages/hal/_initialize.py”, line 1, in
[4039.28] from . import exceptions, _init_wpiHal, _wpiHal
[4039.28] File “/usr/local/lib/python3.9/site-packages/hal/_init_wpiHal.py”, line 12, in
[4039.28] _lib = cdll.LoadLibrary(join(_root, “lib”, “libwpiHal.so”))
[4039.28] File “/usr/local/lib/python3.9/ctypes/init.py”, line 452, in LoadLibrary
[4039.29] return self._dlltype(name)
[4039.29] File “/usr/local/lib/python3.9/ctypes/init.py”, line 374, in init
[4039.29] self._handle = _dlopen(self._name, mode)
[4039.29] OSError: libFRC_NetworkCommunication.so.20: cannot open shared object file: No such file or directory

We have tried this on two separate laptops and RIOs, and are getting the same results.

What image is the roboRIO running?

This stack trace suggests to me you’ve somehow installed the old robotpy-hal-roborio package from a few years ago, which is no longer used and conflicts with the robotpy-hal package from 2020 onwards.

There isn’t really an easy way to fix this, other than to reimage the roboRIO and reinstall RobotPy.

What packages did you install on the roboRIO to end up in this situation?

I’m really curious what packages are on the roborio. Can you do robotpy-installer list and paste it here?

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.