Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Python: TypeError: set_disabled() takes 1 positional argument? (http://www.chiefdelphi.com/forums/showthread.php?t=133942)

team-4480 03-02-2015 20:31

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

Any help will be greatly appreciated!!

TimTheGreat 03-02-2015 21:33

Re: Python: TypeError: set_disabled() takes 1 positional argument?
 
Update pyfrc

team-4480 03-02-2015 22:03

Re: Python: TypeError: set_disabled() takes 1 positional argument?
 
Quote:

Originally Posted by TimTheGreat (Post 1437973)
Update pyfrc

Oh....that fixed it.....thanks! It really should be a "HumanError: Brain not found"!

TimTheGreat 03-02-2015 22:11

Re: Python: TypeError: set_disabled() takes 1 positional argument?
 
Quote:

Originally Posted by team-4480 (Post 1437984)
It really should be a "HumanError: Brain not found"!

Well, until Dustin (virtualD) puts "Update pyfrc" into the error message there really isn't a way to know.

virtuald 03-02-2015 23:14

Re: Python: TypeError: set_disabled() takes 1 positional argument?
 
Quote:

Originally Posted by TimTheGreat (Post 1437990)
Well, until Dustin (virtualD) puts "Update pyfrc" into the error message there really isn't a way to know.

Well, if I knew there was an error message, then I wouldn't have had the bug to begin with! :p

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.


All times are GMT -5. The time now is 01:42.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi