Cannot Require Subsystem
benjiboy50fonz opened this issue · 1 comments
benjiboy50fonz commented
When calling self.requires inside a command with a Subsystem that inherits from wpilib.command.Subsystem, we are seeing the following error:
self.requires(robot.drivetrain)
TypeError: requires(): incompatible function arguments. The following argument types are supported:
1. (self: wpilib.command._commands_v1.Command, s: frc::Subsystem) -> None
Invoked with: <commands.resetcommand.ResetCommand object at 0x7f3907345f68>, <class 'subsystems.drivetrain.DriveTrain'>
The code having this issue is available at https://github.com/FRC2539/pybot/tree/master
Our current packages:
attrs==19.3.0
bcrypt==3.1.7
cffi==1.13.2
cryptography==2.8
importlib-metadata==1.4.0
more-itertools==8.1.0
packaging==20.1
paramiko==2.7.1
Pint==0.10.1
pluggy==0.13.1
py==1.8.1
pycparser==2.19
pyfrc==2020.0.0
PyNaCl==1.3.0
pynetconsole==2.0.2
pynetworktables==2020.0.1
pyntcore==2020.1.2.2
pyparsing==2.4.6
pytest==5.3.4
robotpy-commands-v1==2020.1.2.1
robotpy-ctre==2020.0.1
robotpy-hal==2020.1.2.2
robotpy-halsim-gui==2020.1.2.2
robotpy-installer==2020.0.1
robotpy-navx==2020.0.1
robotpy-rev==2020.0.0
robotpy-rev-color==2020.0.1
robotpy-wpilib-utilities==2020.0.1
robotpy-wpiutil==2020.1.2.2
six==1.14.0
wcwidth==0.1.8
wpilib==2020.1.2.3
zipp==2.0.1
virtuald commented
Error in user's code, the drivetrain was the type of the drivetrain, not the instance.