robotpy / robotpy-rev

RobotPy bindings for REV Robotics' REVLib
Other
8 stars 13 forks source link

[BUG]: CANSparkMax references unknown base type, RobotPy 2024 Beta 3 #53

Closed escime closed 11 months ago

escime commented 11 months ago

Problem description

When running code in simulation using Robotpy 2024 Beta 3, any time CANSparkMax is imported, the code fails to run with error ImportError: generic_type: type "CANSparkMaxLowLevel" referenced unknown base type "frc::MotorController" reported. Limiting the code to just this import line still gives the same error. This import statement still has no issue in 2023 RobotPy.

Screenshot 2023-11-13 135805

[NOTE: I'm not really a Python developer or experienced with Github, so I apologize if I'm using this bug reporting process wrong.]

Operating System

Windows

Installed Python Packages

asttokens                2.2.1
attrs                    22.2.0
backcall                 0.2.0
bcrypt                   4.0.1
CacheControl             0.12.11
certifi                  2023.5.7
cffi                     1.15.1
charset-normalizer       3.1.0
click                    8.1.3
cmake                    3.26.4
colorama                 0.4.6
comm                     0.1.3
contourpy                1.1.0
cryptography             40.0.1
cycler                   0.11.0
debugpy                  1.6.7
decorator                5.1.1
executing                1.2.0
fonttools                4.42.0
idna                     3.4
iniconfig                2.0.0
ipykernel                6.23.1
ipython                  8.13.2
jedi                     0.18.2
jupyter_client           8.2.0
jupyter_core             5.3.0
kiwisolver               1.4.4
matplotlib               3.7.2
matplotlib-inline        0.1.6
msgpack                  1.0.5
nest-asyncio             1.5.6
numpy                    1.24.3
opencv-python            4.7.0.72
packaging                23.0
paramiko                 3.1.0
parso                    0.8.3
phoenix6                 24.0.0b2
pickleshare              0.7.5
Pillow                   9.5.0
Pint                     0.20.1
pip                      23.3.1
platformdirs             3.5.1
pluggy                   1.0.0
prompt-toolkit           3.0.38
psutil                   5.9.5
pupil-apriltags          1.0.4.post10
pure-eval                0.2.2
pycparser                2.21
pyfrc                    2024.0.0b1
Pygments                 2.15.1
PyNaCl                   1.5.0
pynetconsole             2.0.4
pyntcore                 2024.0.0b3.post1
pyparsing                3.0.9
pypng                    0.20220715.0
pytest                   7.2.2
pytest-reraise           2.1.2
python-dateutil          2.8.2
pywin32                  306
pyzmq                    25.0.2
qrcode                   7.4.2
requests                 2.31.0
robotpy                  2024.0.0b3
robotpy-commands-v2      2024.0.0b3
robotpy-ctre             2024.0.0b1
robotpy-hal              2024.0.0b3.post1
robotpy-halsim-gui       2024.0.0b3.post1
robotpy-installer        2024.0.0b2
robotpy-navx             2023.0.3
robotpy-pathplannerlib   2023.3.4.1
robotpy-rev              2024.0.0b1
robotpy-wpilib-utilities 2024.0.0b1
robotpy-wpimath          2024.0.0b3.post1
robotpy-wpinet           2024.0.0b3.post1
robotpy-wpiutil          2024.0.0b3.post1
setuptools               68.0.0
six                      1.16.0
stack-data               0.6.2
statbotics               2.0.3
tbapy                    1.3.2
tornado                  6.3.2
traitlets                5.9.0
typing_extensions        4.5.0
urllib3                  2.0.2
wcwidth                  0.2.6
wheel                    0.40.0
wpilib                   2024.0.0b3.post1

Reproducible example code

from rev import CANSparkMax
virtuald commented 11 months ago

Which version of python?

escime commented 11 months ago

Version is 3.11.0

virtuald commented 11 months ago

I rebuilt and pushed a robotpy-rev==2024.0.0b1.post1, try upgrading and see if that resolves the issue. We do run a test where we import the CANSparkMax in CI, so I can't think of a good reason why this would have broken.

virtuald commented 11 months ago

If that doesn't resolve the issue, then I would uninstall the older robotpy packages that you have and try again: robotpy-navx and robotpy-pathplannerlib both are 2023 versions.

escime commented 11 months ago

That resolved the issue. Thanks!

virtuald commented 11 months ago

Which one resolved the issue?

escime commented 11 months ago

Installing 2024.0.0b1.post1. After installation, software ran with no issue.