Python Forum
__call__() got an unexpected keyword argument 'text'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
__call__() got an unexpected keyword argument 'text'
#1
IDK what my problem is, i run it and i have come to this conclusion that if i get rid of the startClick function it runs if i put it back it breaks. plz help
Error:
Traceback (most recent call last): File "C:\Users\saba_\Desktop\python\clickerHero.py", line 44, in <module> start = Button(root, text="start", width=25, bg="lightgreen", command=startClick) TypeError: __call__() got an unexpected keyword argument 'text' >>>
from tkinter import *
import time
from pynput.mouse import Button, Controller

#creates the window
root = Tk()
root.geometry("600x400")
root.title("attempt1")


#global var




#def
def startClick():
    startClickingVar = 0
    if startClickingVar == 0:
        startClickingVar = 1
        while startClickingVar == 1:
            mouse.click(Button.right, 1)
    else:
        pass

def stopClick():
    if startClickingVar == 1:
        startClickingVar = 0
    else:
        pass

def exit():
    exit()

#var



#lables
welcomingLable = Label(root, text="Hi, Welocme to Hero Clicker AutoClicker", font=("arial", 20, "bold"), fg = "blue")
welcomingLable.pack(side=TOP)

#buttons
start = Button(root, text="start", width=25, bg="lightgreen", command=startClick)
start.place(x=50, y=140)

stop = Button(root,text="stop", width = 25, bg="red", command=stopClick)
stop.place(x=300, y=140)

exitButton = Button(root, text="Exit", width = 25, bg="red", command=exit)
exitButton.place(x=175, y=180)


#enterys
numberOfClicks = 1
enterCardInfo = Entry(root, textvariable= numberOfClicks, width=50, bg="orange",)
enterCardInfo.place(x=150, y=100)


# has to stay below so everthing runs within
root.mainloop()
Reply


Messages In This Thread
__call__() got an unexpected keyword argument 'text' - by saba_keon - Apr-06-2018, 08:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Django "Unexpected Keyword Argument 'min_value'" AstralWeeks 0 263 Mar-27-2024, 04:56 AM
Last Post: AstralWeeks
  Find a specific keyword after another keyword and change the output sgtmcc 5 879 Oct-05-2023, 07:41 PM
Last Post: deanhystad
  "unexpected keyword arg" when initializing my subclasses Phaze90 3 3,236 Nov-25-2022, 07:39 PM
Last Post: Gribouillis
  i want to use type= as a function/method keyword argument Skaperen 9 1,948 Nov-06-2022, 04:28 AM
Last Post: Skaperen
  TypeError: __init__() got an unexpected keyword argument 'value' Anldra12 7 22,776 May-11-2021, 06:35 PM
Last Post: deanhystad
  TypeError: coerce_kw_type() got an unexpected keyword argument 'dest' juniii 1 2,453 Apr-24-2020, 01:53 PM
Last Post: Jeff900
  SyntaxError: positional argument follows keyword argument syd_jat 3 5,880 Mar-03-2020, 08:34 AM
Last Post: buran
  Design question will __call__ rudihammad 1 1,942 Aug-11-2019, 11:58 AM
Last Post: ichabod801
  Super with Sublime Text - TypeError: super() takes at least 1 argument (0 given) Shafla 6 7,508 May-04-2019, 08:30 PM
Last Post: Shafla
  unexpected text file output <_io.TextIOWrapper… encoding='cp1252'> sleepylog 3 12,851 Aug-20-2017, 12:06 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

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