App gets stuck in an endless refresh loop

Hello everyone.

I am a new streamlit lover. Just joined this community and I look forward to interact with everyone. I would appreciate if anyone could help me with the following issue:

My app gets stuck in and endless refresh loop right after I upload a pdf using the file uploader widget in the sidebar. sometime the refresh ends after 5 iterations. sometimes 10. sometimes 100. It is really random when it ends. sometimes it doesn’t refresh at all and works like a charm.

My app is simple. I upload a pdf file. The app finds the relevant pages. The user then selects the page they like. The app converts that page into a canvas. The user then draws a rectangle around the relevant tables existing on that page. The code then extracts the information from that table and uploads it to a sql database.

I will definitely share my code if that is required to find the root cause of this.

Happy to be here.
Cheers everyone

Hi @siliboy, welcome to the Streamlit community!

Can you post a link to the code that demonstrates this behavior? Without seeing how you’re actually implementing this, it’s hard to suggest what might be wrong.


@randyzwitch Thanks Randy for getting back to me. Here is the link to the github repository. The main file is the you can try it on the file found in the data folder to see the issue.

please let me know if there is anything else I should provide.


@randyzwitch How is it going? I thought to check in with you and see if you need anything else from me? Thank you :slight_smile:

Hi @siliboy,

Can you try to create a minimum sufficient implementation of this that shows the issue and doesn’t need to store the table to Azure. This will cut down the requirements.txt a lot and make it easier to reproduce locally.

P.S. You appear to have account info in one of your files, which I don’t want to touch either.


@asehmi Sure. Those account info were all dummy btw. But ok let me do that. Do you want me to share a deployed link? Or just shorten the scripts and cut out unnecessary pieces for yourself to run on your own?

Share a deployed link please!

Something that’s easy to run locally and also see online for a quick peek.

Having the same issue, happens several times a day. Just a loading wheel, nothing else in screes. Not even the Streamlit menu in the bottom right.

“Fix” is to reboot the app until it happens again…