Akascape / CTkToolTip

Small pop-up widget for displaying details inside customtkinter. (extension/add-on)
Creative Commons Zero v1.0 Universal
111 stars 7 forks source link

Error when using it #13

Closed zSynctic closed 1 year ago

zSynctic commented 1 year ago

I already used the ctktooltip before but now when I'm using it I'm getting an error even though I did the same thing but its working in a different project of mine.

I get this error: Exception has occurred: TypeError 'CTkLabel' object is not callable

thanks image

Akascape commented 1 year ago

@zSynctic Not a ctktooltip issue ig. Please provide the full error of line/file. And also update to latest version.

idiotcommerce commented 1 year ago

this code is working fine. you provide above code is not in you library. and which file gettign error. how anyone know. invalid

zSynctic commented 1 year ago

@zSynctic Not a ctktooltip issue ig. Please provide the full error of line/file. And also update to latest version.

Exception has occurred: TypeError 'CTkLabel' object is not callable File "D:\Python Programming\Projects**.py", line 88, in init self.tooltipsettings = CTkToolTip(self.settingsbtn, message="Settings", delay=0) File "D:\Python Programming\Projects**.py", line 500, in app = App() TypeError: 'CTkLabel' object is not callable

zSynctic commented 1 year ago

this code is working fine. you provide above code is not in you library. and which file getting error. how anyone know. invalid

Sorry I don't understand what you meant, the libraries importing are just fine and this project was always working only when I add the tooltip it doesn't work somehow

Akascape commented 1 year ago

@zSynctic I guess you have a label named as CTkToolTip in your project. That is why you are getting this type error, as it is assuming the ctktooltip as a ctklabel. Find it and change the name of that label.

idiotcommerce commented 1 year ago

image

this is your file structed in github. mabe some name type error. please check it

zSynctic commented 1 year ago

@zSynctic I guess you have a label named as CTkToolTip in your project. That is why you are getting this type error, as it is assuming the ctktooltip as a ctklabel. Find it and change the name of that label.

Just checked that the only things named ctktooltip in my project are the importing of the library and this one

Akascape commented 1 year ago

@zSynctic, is the basic example also showing this error in your machine? If not, then the problem is somewhere in your code. Or at least try to give a minimal example of your code so that I can test it.

And also check if app variable is also a ctklabel in your project:

File "D:\Python Programming\Projects**.py", line 500, in
app = App()
TypeError: 'CTkLabel' object is not callable
zSynctic commented 1 year ago

no app is not a ctklabel also the ctktooltip worked fine in my other project so I don't know what is the issue, I removed the ctktooltip and it seems even ctktoplevel has a problem even though it works it shows some issues tried fixing it or searching for any problem in the code can't find anything might try uninstalling both ctktooltip and customtkinter and downloading them both again

Akascape commented 1 year ago

@zSynctic Try updating the ctktooltip package. Make sure to also update other manual package folders if available in your project.

zSynctic commented 1 year ago

Sadly I'm still getting the same issue. also here is my error for ctktoplevel:

Exception in Tkinter callback Traceback (most recent call last): File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\tkinter__init.py", line 1921, in call__ return self.func(args) File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked self._command() File "D:\Python Programming\Projects**.py", line 244, in showSett self.settingsview = customtkinter.CTkToplevel(self, fg_color="dark_color") File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\customtkinter\windows\ctk_toplevel.py", line 36, in init super().init(args, pop_from_dict_by_set(kwargs, self._valid_tk_toplevel_arguments)) File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\tkinter__init.py", line 2653, in init__ self.title(root.title()) TypeError: 'CTkLabel' object is not callable

Akascape commented 1 year ago

@zSynctic I can't do anything with this issue. You have to give a minimal example which causes this problem. Otherwise there is fault in your code only as I am unable to produce this error in my system. The error logs are also not sufficient to figure out the bug. This type error generally occurs when you try to call a CTkLabel object. Thoroughly check the showSett function/class of your project.

idiotcommerce commented 1 year ago

i think there may be problem please check it.

image

zSynctic commented 1 year ago

bruh I just found out the issue it was a dumb thing because I made the customtkinter title have the same library as the label even tho it was like this from before I just started getting the issue bec of it

zSynctic commented 1 year ago

thanks

Akascape commented 1 year ago

@zSynctic I knew it was due to some dumb naming of objects.

idiotcommerce commented 1 year ago

Have a great day.