Hot-reloading not working
See original GitHub issueHi, I think I’m hitting this again https://github.com/streamlit/streamlit/issues/358 I did not investigate why the fix https://github.com/streamlit/streamlit/pull/537 doesn’t work
System
Streamlit: version 0.51.0
Description: Manjaro Linux
Release: 18.1.3
Using streamlit remotely with ssh port forwarding
Steps to reproduce:
Files
project/demo/demo.py
import streamlit as st
from mytest import fun
st.info(fun())
project/src/mytest.py
def fun():
return 2
Execute
cd project
export PYTHONPATH="${PYTHONPATH}:src/"
streamlit run demo/demo.py
Problem
Changing the return value of fun()
in src/mytest.py
doesn’t change the output in streamlit.
Neither by modifying src/mytest.py
and saving it (this would be cool), modifying demo/demo.py
and saving it, pressing Run again
nor Clear cache
Workaround
Closing and restart the streamlit server.
Maybe related
I have problems making streamlit recognize newly installed python packages, I have to restart the server.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Hot Reload is not working in my React App - Stack Overflow
Hot Reload is not working in my React App · This does happen sometimes. Do npm install and try adding some code. ·...
Read more >Hot reload not working - Visual Studio Feedback
I'm trying to use Hot Reload on Android Emulador, but when I do any change in XAML file, the app doesn't update. Looking...
Read more >Hot Reload stopped working with React "^17.0.1" · Issue #9904
Describe the bug Hot reloading when the redux-state change stopped working when I use CRA to get the last React version.
Read more >Troubleshooting XAML Hot Reload - Visual Studio (Windows)
If Hot Reload is not available · Verify that XAML Hot Reload is enabled · Verify that you use Start Debugging rather than...
Read more >Hot Reload not working in React 17.0.3 - Code with Mosh Forum
Hi, I have recently created a new project with create-react-app. Also, I am following Mosh's Mastering React course and according to it, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We will allow anything prefixed by an element in the
PYTHONPATH
, so it should work. I think we should consider that the individual paths specified in thePYTHONPATH
can be absolute paths or paths that are relative to the current working directory.This was debated some time back and we decided against it. We choose instead to include everything that was contained in the directory of the main python script. The reasoning behind that is that you have less control on what it is in your current working directory. That said, I’ll bring it up again internally. We can also add more configurability. The
PYTHONPATH
itself allows for easily get around this and seems a reasonable solution to me. Given that thePYTHONPATH
can be relative, by adding.
to thePYTHONPATH
you would allow anything contained in the current working directory recursively.Hi,
Would it work if we had nested python packages, e.g.
src/mypackage/mytest.py
, but onlysrc
in thePYTHONPATH
?Please consider adding to the watcher all the python files
*.py
recursively from the working directory from whichstreamlit
is launched. So in in this examples I’d like to watch all the file that matchproject/**/*.py
.As an additional benefit, in this way it should work even with configurations that don’t make use of the
PYTHONPATH
env variable, but use theos
package to change paths.