Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messagebox is shown correctly only once #59

Open
JohnnyFruitbasket opened this issue Apr 5, 2024 · 4 comments
Open

Messagebox is shown correctly only once #59

JohnnyFruitbasket opened this issue Apr 5, 2024 · 4 comments

Comments

@JohnnyFruitbasket
Copy link

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
Copy link
Author

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

@Velonicz
Copy link

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

@JohnnyFruitbasket
Copy link
Author

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.

@alejorojas95
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants