Skip to content Skip to sidebar Skip to footer

Error "__init__() Takes From 2 To 3 Positional Arguments But 4 Were Given" When I Only Have The 3 Arguments

Okay, so I am trying to make a tooltip, and ever since I tried making the test tooltip, I get an error with the dropdown box I am trying to bind it to. I have tried giving it strin

Solution 1:

Your problem lies in the code from tkinter.tix import *, you should replace it with:

from tkinter.tix import Balloon 
# Orimport tkinter.tix # then tkinter.tix.Balloon(root)

But this wont entirely solve all your issues, because ever since version 3.6, tix is unmaintained, so the ToolTip will give you an error when you try to initialize it. What you can do here is, either use Pmw tooltip or create your own tooltip.

You can see an example of Pmw.Balloonhere and you can also see how to make your own tooltip right below it too.

Post a Comment for "Error "__init__() Takes From 2 To 3 Positional Arguments But 4 Were Given" When I Only Have The 3 Arguments"