RobotPy 2021 issue with rev module on roborio

Whenever I try to run a program that imports the rev library on the roborio I get an error message like this one:

    Traceback (most recent call last):
      File "/home/lvuser/", line 1, in <module>
        import rev
      File "/usr/local/lib/python3.9/site-packages/rev/", line 3, in <module>
        from . import _init_rev
      File "/usr/local/lib/python3.9/site-packages/rev/", line 12, in <module>
        import rev._sparkmaxdriver._init_rev_spark_driver
      File "/usr/local/lib/python3.9/site-packages/rev/_sparkmaxdriver/", line 1, in <module>
        from . import _init_rev_spark_driver
      File "/usr/local/lib/python3.9/site-packages/rev/_sparkmaxdriver/", line 14, in <module>
        _lib = cdll.LoadLibrary(join(_root, "lib", ""))
      File "/usr/local/lib/python3.9/ctypes/", line 452, in LoadLibrary
        return self._dlltype(name)
      File "/usr/local/lib/python3.9/ctypes/", line 374, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: cannot open shared object file: No such file or directory

Does anyone know how I can fix this?

(You may notice that it is not running the main program and is instead running a file called, this file contains only a single line with import rev)

Well, we knew this affected the macOS libraries, but didn’t notice this was also a problem on the roboRIO. That’s awkward.

There is a workaround solution. Download the following file, and inside in the linux\athena\shared folder there is a file. if you ftp that into /usr/local/frc/third-party/lib on the roborio, it should then run. You might also have to ssh in and run ldconfig

This worked, thanks. I did not have to run ldconfig (though its probably because I reset the roborio before I tested if the program was now running).

I’ve found a workaround at build time. robotpy-rev 2021.0.2 should fix this for good (and has the bonus of macOS support too).

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