Python Forum
Why am I getting this TypeError?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why am I getting this TypeError?
#1
Maybe it's early morning brain...The line called out is:
self.new_queue = Queue("New", sim)
and the error says:
Error:
TypeError: Queue.__init__() takes from 1 to 2 positional arguments but 3 were given
and the declaration says:
class Queue:
    def __init__(self, name: str, sim):
deanhystad write Oct-14-2023, 03:44 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Attached Files

Thumbnail(s)
   
Reply


Messages In This Thread
Why am I getting this TypeError? - by pitosalas - Oct-14-2023, 12:22 PM
RE: Why am I getting this TypeError? - by menator01 - Oct-14-2023, 12:28 PM
RE: Why am I getting this TypeError? - by pitosalas - Oct-14-2023, 01:46 PM
RE: Why am I getting this TypeError? - by menator01 - Oct-14-2023, 02:49 PM
RE: Why am I getting this TypeError? - by DeaD_EyE - Oct-15-2023, 01:00 PM

Forum Jump:

User Panel Messages

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