Python Forum
Do I have to pass 85 variables to function?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do I have to pass 85 variables to function?
#4
When I try and pass xx which is a dataframe I believe, I get the following message.

def load_horse_data(xx):

	horse_array[horse_count][0] = xx[hcount][race_number]
	horse_array[horse_count][1] = xx[hcount][todays_purse]
error message:

$ python pyfuncs.py
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Milford\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py", line 1883, in __call__
return self.func(*args)
File "pyfuncs.py", line 138, in select_track
load_track_to_Handi()
File "pyfuncs.py", line 110, in load_track_to_Handi
load_horse_data()
TypeError: load_horse_data() missing 1 required positional argument: 'xx'
Reply


Messages In This Thread
RE: Do I have to pass 85 variables to function? - by Milfredo - Sep-26-2020, 05:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to pass encrypted pass to pyodbc script tester_V 0 891 Jul-27-2023, 12:40 AM
Last Post: tester_V
  How to print variables in function? samuelbachorik 3 930 Dec-31-2022, 11:12 PM
Last Post: stevendaprano
  User-defined function to reset variables? Mark17 3 1,688 May-25-2022, 07:22 PM
Last Post: Gribouillis
  How to pass variables from one class to another hobbyist 18 10,901 Oct-01-2021, 05:54 PM
Last Post: deanhystad
  Regex - Pass Flags as a function argument? muzikman 6 3,660 Sep-06-2021, 03:43 PM
Last Post: muzikman
  Possible to dynamically pass arguments to a function? grimm1111 2 2,222 Feb-21-2021, 05:57 AM
Last Post: deanhystad
  Pass by object reference when does it behave like pass by value or reference? mczarnek 2 2,581 Sep-07-2020, 08:02 AM
Last Post: perfringo
  print function help percentage and slash (multiple variables) leodavinci1990 3 2,519 Aug-10-2020, 02:51 AM
Last Post: bowlofred
  Pass integers to datetime.date function florian 3 2,747 Jul-18-2020, 04:43 AM
Last Post: scidam
  How to pass multiple arguments into function Mekala 4 2,481 Jul-11-2020, 07:03 AM
Last Post: Mekala

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020