Go to Post Wins = Attention Attention = Sponsors Sponsors = Money Money= being able to do more. a vicious cycle...but it is what it is - Protronie [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-02-2015, 20:31
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
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!!
  #2   Spotlight this post!  
Unread 03-02-2015, 21:33
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 238
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: Python: TypeError: set_disabled() takes 1 positional argument?

Update pyfrc
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
  #3   Spotlight this post!  
Unread 03-02-2015, 22:03
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: Python: TypeError: set_disabled() takes 1 positional argument?

Quote:
Originally Posted by TimTheGreat View Post
Update pyfrc
Oh....that fixed it.....thanks! It really should be a "HumanError: Brain not found"!
  #4   Spotlight this post!  
Unread 03-02-2015, 22:11
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 238
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: Python: TypeError: set_disabled() takes 1 positional argument?

Quote:
Originally Posted by team-4480 View Post
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.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
  #5   Spotlight this post!  
Unread 03-02-2015, 23:14
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,086
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Python: TypeError: set_disabled() takes 1 positional argument?

Quote:
Originally Posted by TimTheGreat View Post
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!

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.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:06.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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