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
Streamlit started giving 404: Not Found and no longer wants to work. #244
Comments
.\streamlit hello now also 404's |
|
I am having the same issue, running on Anaconda but all other Debug info is the same otherwise. |
Thank you for this issue. @tvst is looking into this right now and we'll get back to you! |
@Code4SAFrankie and @Hubes92 : Could you please try: pip install streamlit==0.47.0 and see if that fixes the problem? |
Also, we are still looking into this, but we believe this issue has to do with Windows, not your code snippet, @Code4SAFrankie. After correcting a small bug in your code @Code4SAFrankie, I found that this worked for me (on MacOS): import streamlit as st
options = st.multiselect(
'What are your favorite colors',
('Green', 'Yellow', 'Red', 'Blue'),
('Yellow', 'Red'))
st.write('You selected:', options) |
Install 0.47.0 still gives me the same error unfortunately. |
Update: I was able to install Streamlit and run *Well that's not 100% true... I ran into this #236 , but that's not Windows-specific and we have a fix coming out! Then I re-read the issue and realized you're using something called WinPython — so let me try that tomorrow. Clearly I'm not a Windows expert 👶 , apologies for the delay! |
@tvst Im having the same issue but Im not using WinPython, I run with anaconda. The config.py also hard codes the port in to 8051, I changed it in that script to see if that helps but it didnt. I also found that the address was hard coded to localHost and changed to various other valid localhost addresses in Server.py etc but that didnt help either. Hope it helps somewhat or might just be useless information. |
You probably already checked this, but just to get the obvious things out of the way: can you make sure Windows Firewall is not blocking Streamlit? I noticed that when I first ran a Streamlit app on Windows I had to click through a dialog to allow it to use port 8501. I don't know if there's some situation that would cause the firewall to revoke that permission behind the scenes... |
Yeah @tvst double checked that and changed the port as well in case that was the cause. |
Facing the same issue |
Same here. Win10 / Python 3.7.1
I also tried the version 0.47.0 but same 404: Not Found |
Windows 10 / Python 3.6.7 Running "streamlit hello", gives me 404 error. |
Note that you can't run jupyter-lab and streamlit at the same time, since they both by default use the same port; but even getting the 404 without running jupyter-lab. Streamlit did initially work, but then stopped working and instead giving 404. |
I've been able to get it to work while running JupyterLab by simply navigating to http://localhost:8501/index.html and then the page loads, otherwise its a 404. |
Wow! Going to http://localhost:8501/index.html does not give me the 404 error, but instead correctly loads!!! Thanks! |
@ismailuddin Thanks a million! It does work on http://localhost:8501/index.html |
Awesome, @ismailuddin !! Thanks for the work-around. I'm still having problems reproducing the issue, though. So I have some more questions:
Here's a page talking about how to grab a HAR file in different browsers: https://community.box.com/t5/Managing-Content-Troubleshooting/How-to-Generate-Network-Captures-for-Troubleshooting/ta-p/366
Weird. On my machine, JupyterLab uses 8888 while Streamlit uses 8501. Are you saying they're both on 8501 on your machine? Also, since version 0.47.0 Streamlit tries to find an open port when 8501 is taken. So even if JupyterLab is on that port Streamlit should run fine.
|
Thank you @ismailuddin |
Yup on my machine Jupyter Lab is using port 8888 as well so it shouldn't actually be interfering. Tbh, I didn't actually try without JLab since it's practically always running on my laptop. Unfortunately I don't have access to my Windows machine for a few days so won't be able to try any of that out just yet. |
Sorry Jupyter Lab is using port 8888 on my machine. |
Thanks, that makes sense! So I'm assuming the JupyterLab thing is a red herring at this point. My best guess is that this would be fixed if we modified this function call in routes.extend(
[
(r"/(.*)", StaticFileHandler, {
"path": "%s/" % static_path,
"default_filename": "index.html",
}),
]
) But I can't repro the issue, so I can't verify that this fixes it. (Although we should probably do this anyway since it's cleaner than the current code!) That said, if any enterprising soul would like verify that the above solves your problem, that would be amazing 😃 |
That change fixes the issue for me. |
Awesome! Sending out a pull request right now. |
* Improve how we serve index.html to fix #244 * Make util.open_browser() not add 'index.html' suffix on Windows. * Improve DeckGL docs. * Fix typo in comment.
work for me perfectly
|
@BENBOUZIANE : Could you please let us know if you're still seeing this issue in 0.50.2, the latest version of Streamlit? If so, we would greatly appreciate if you opened a new bug describing your experience. Thank you for using Streamlit! |
@treuille : Yes the problem still exists in version 0.50.2 which is why I installed version 0.47.0. |
@treuille : I am able to see localhost in streamlit 0.51.0 but no cannot find the page on the network. |
@kurt-rhee : I'm sorry you're having that problem. Could you please open a bug report and fill in the full form so that we can reproduce this issue? Thanks, and happy New Year! 🎆 |
@treuille thanks for the mention, I was able to figure the problem out! |
Summary
Streamlit started giving 404: Not Found and no longer wants to work.
Steps to reproduce
Added the multiselect example to my code:
Expected behavior:
To get an app with a working multiselect
Actual behavior:
App gives 404: Not Found and nothing I do wants to make it work again.
Is this a regression?
yes
Debug info
Streamlit version: 0.47.2
Python version: 3.7.1
Using Conda? PipEnv? PyEnv? Pex? pip on WinPython
OS version: Windows 10 version 1903
Browser version: Firefox 69.0
Additional information
Tried changing the port, enabling debugging, killing the console and restarting. Not running jupyter-lab. Removing the multiselect code. Tried using
http://localhost:8501/?a=1
. Triedhttp://192.168.1.34:8501
. Seems to be caching and always just returning the 404.The text was updated successfully, but these errors were encountered: