|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Python: TypeError: set_disabled() takes 1 positional argument?
Hi! We are running into a problem with our code when we try to run the Pyfrc Sim. I am testing using some switches with DigitalInputs and I was checking for errors since I am out of reach of the robot. Code: http://pastebin.com/Es4z97GK. I get this error when running the sim.
Code:
Traceback (most recent call last):
File "robot.py", line 84, in <module>
wpilib.run(MyRobot)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/wpilib/_impl/main.py", line 100, in run
retval = options.cmdobj.run(options, robot_class, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyfrc/mains/cli_sim.py", line 46, in run
ui = sim.SimUI(sim_manager, fake_time, field_size, px_per_ft)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyfrc/sim/ui.py", line 59, in __init__
self.timer_fired()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyfrc/sim/ui.py", line 329, in timer_fired
self.update_widgets()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyfrc/sim/ui.py", line 361, in update_widgets
dio.set_disabled(False)
TypeError: set_disabled() takes 1 positional argument but 2 were given
|
|
#2
|
||||
|
||||
|
Re: Python: TypeError: set_disabled() takes 1 positional argument?
Update pyfrc
|
|
#3
|
||||
|
||||
|
Re: Python: TypeError: set_disabled() takes 1 positional argument?
Oh....that fixed it.....thanks! It really should be a "HumanError: Brain not found"!
|
|
#4
|
||||
|
||||
|
Re: Python: TypeError: set_disabled() takes 1 positional argument?
Well, until Dustin (virtualD) puts "Update pyfrc" into the error message there really isn't a way to know.
|
|
#5
|
||||
|
||||
|
Re: Python: TypeError: set_disabled() takes 1 positional argument?
Quote:
![]() However, as Tim points out, if you run into a weird error, it's always best to make sure that you have the latest version -- especially this year, with so many new things for the new control system. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|