None of the two solutions works. When I host the app, the prompt is fine. But when I then try to access the app via either the network url or the local, it suddenly keeps spamming the messages in the picture below every millisecond and the app just says âPlease WaitâŚâ and blinks âConnectingâŚâ in the upper right corner⌠Any hints?
Streamlit version: 0.69.2
From the error message, it seems like the issue is that it canât find the file on the G:// drive. If youâre hosting this app somewhere other than the computer where you developed it, itâs unlikely that the same drive letter will be applicable.
Itâs better if you can either give an exact directory path including the machine name, or using a relative reference to the file relative to where the Python code is running.
Well that is the odd thing. I donât think the drive where the file is located on is the problem.
It does it even though I am on my C:// drive as well.
Right, but if Python is throwing an error, then it doesnât really matter the drive letter.
To debug, can you comment out the section that contains the file reading portion and see if the app loads? If it does, then we can focus on fixing that error. Or, feel free to post a code snippet and I can try it myself.
I have found the issue but I have absolutely no idea why it is causing itâŚ
When I comment out snippet 1, it works. Yet, snippet 2 is causing no problemsâŚ
Could it be due to the sheer size of the FastText-model (128MB)?
Note: Iâve tried with and without @st.cache(allow_output_mutation=True).
@st.cache(allow_output_mutation=True)
def load_pep():
data = pd.read_excel(râfile:///C:/Repos/Streamlit/Baggrundstjek/PEP_listen_updated 09102020.xlsxâ)
data = data[data[âFornavnâ].notna()]
return data
pep = load_pep()
What is even more odd is that everything works perfectly fine every single time if i do the followingâŚ
Step 1:
Run the streamlit x.py file.
Step 2:
go to the app (either through localhost or network url, doesnât matter)
Step 3: Experiencing the " Symptom #2: The app says âPlease waitâŚâ forever" (https://docs.streamlit.io/en/0.62.0/troubleshooting/not-loading.html)
Step 3: Shut down the app in the anaconda prompt and start it again immediately while remaining on the app in the browser.
Step 4: The app instanly âgets connectionâ and loads and works perfectly fineâŚ
However, this is not a solution since I canât restart the app everytime someone tries to access it.
I am quite sure the problem is somehow related to when I load a file in the script, but why?
No, this (almost certainly) isnât a Streamlit-related issue. Running chdir() seems like the wrong method to be using in an application. Can you specify the directory path explicitly, or at least make a relative reference to the file?
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking âAccept allâ, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.