CTkMessagebox icon indicating copy to clipboard operation
CTkMessagebox copied to clipboard

Messagebox is shown correctly only once

Open JohnnyFruitbasket opened this issue 1 year ago • 4 comments

Trying to put Ctk Messageboxes in my code so that users get some sort of response from the program. For some reason, the messagebox is shown correctly only once, the first time I run the program, then this happens:

image

def fetch_data_url(self):
    url = self.app_frame.insert_url.get()
    response = requests.get(url)
    if response.status_code == 200:
            soup = BeautifulSoup(response.content, 'html.parser')
            tables = soup.find_all('table')

            for i, table in enumerate(tables):
                df = pd.read_html(str(table))[0]
                self.df_list.append(df)
            CTkMessagebox(message="Data successfully fetched from URL",
                icon="check", option_1="OK")

Anybody knows about this error? Is there something I could change? I first suspected my python version for be outdated, but it is very weird that the first time, it displayes correctly.

JohnnyFruitbasket avatar Apr 05 '24 09:04 JohnnyFruitbasket

As I have seen now, the IDE also throws a warning: image Still, I am not sure why this works the first instance

JohnnyFruitbasket avatar Apr 05 '24 11:04 JohnnyFruitbasket

Hey, just wanted to report that I'm facing the same issue when using a jupyter file. The first time I run the code it works just fine. When i stop the code and start it again, it doesn't work anymore, as show above. I also get the same error. I always have to restart the kernel to get it to work again. In a regular python file it works, only occurs in a jupyter file to me

Velonicz avatar May 24 '24 21:05 Velonicz

Using Jupyter Notebook as well. I did not test it in a regular python file, did not think this could be an Jupyter issue. But maybe this is it.

JohnnyFruitbasket avatar May 28 '24 08:05 JohnnyFruitbasket

They managed to solve it, it happens to me in spyder, restarting the kernel in visual studio code, no, but it's something like the cache that keeps images in cache, the creator should solve that, not always store them, load them.

alejorojas95 avatar Sep 19 '24 04:09 alejorojas95