Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missing Postional Arguments
#2
Look on line 29 of your classes file. You define five arguments to the __init__ for the Realtor class: username, phone_number, city, suburb, and rooms. Then on line 107 in main.py, you only have three input statements to generate those arguments. It appears you are not supplying username or phone_number, so you need to supply those from somewhere.

Using inputs when calling the class is kind of odd. I would gather the inputs separately, and then create the instance:

city = input("What city?: ").capitalize()
suburb = input("What suburb?: ").capitalize()
rooms = input("How manny rooms?: ").capitalize()
find = Realtor(username, phone_number, city, suburb, rooms)
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Missing Postional Arguments - by Psypher1 - Nov-12-2019, 07:20 PM
RE: Missing Postional Arguments - by ichabod801 - Nov-12-2019, 09:16 PM
RE: Missing Postional Arguments - by Psypher1 - Nov-13-2019, 09:32 AM
RE: Missing Postional Arguments - by ichabod801 - Nov-13-2019, 03:21 PM
RE: Missing Postional Arguments - by Psypher1 - Nov-14-2019, 12:15 PM
RE: Missing Postional Arguments - by ichabod801 - Nov-14-2019, 01:26 PM
RE: Missing Postional Arguments - by Psypher1 - Nov-15-2019, 04:31 PM
RE: Missing Postional Arguments - by ichabod801 - Nov-15-2019, 04:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: missing 3 required positional arguments: wardancer84 9 11,163 Aug-19-2021, 04:27 PM
Last Post: deanhystad
  TypeError: max_value() missing 2 required positional arguments: 'alpha' and 'beta' Anldra12 2 4,267 May-15-2021, 04:15 PM
Last Post: Anldra12
  TypeError: add() missing 2 required positional arguments NectDz 5 13,255 May-28-2020, 02:54 PM
Last Post: BitPythoner
  Missing 2 Required Positional Arguments: SwiftWater 1 20,057 Feb-28-2019, 08:57 AM
Last Post: buran
  Functions (Arguments Passing,Changing a mutable ,Assignment to Arguments Names) Adelton 2 3,923 Mar-02-2017, 10:23 PM
Last Post: zivoni

Forum Jump:

User Panel Messages

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