The app works fine locally. When I’m trying to deploy the app it works at first, but when going to the ‘archive’ page I get this message on the page itself (not in the log):
Network issue: Cannot load Streamlit frontend code. This can happen when you update Streamlit while a Streamlit app is running. To fix this, simply reload this app by pressing F5, Ctrl+R, or Cmd+R. If the error persists, try force-clearing your browser’s cache as described here
There are no errors in the log. The other pages of the data app work fine, so I think it might have something to do with the things I load/packages I use in the ‘archive’ page? The page should have sliders, load a netcdf file with xarray, and plot a map using matplotlib and cartopy.
Things I’ve tried:
Clearing my browser’s cache as mentioned in the error message.
Using another browser
Using conda instead of pip for packages installation
Deploy the data app without loading the netcdf file with xarray: the problem persists.
Plotting with matplotlib and cartopy: the app crashes without giving and error.
Just using matplotlib without cartopy: the data app works fine.
So there might be an issue with using Cartopy to plot, but as there is no error messages I don’t really know why.
O sorry for not responding! It did really help and thanks so much for your time. I thought it worked after that and didn’t have time to look at it again until a few weeks ago. The project was made private again on Github as I didn’t want the data to be fully public yet.
I did have a look at the possibility of it being an issue with the data like you suggested, but the error persists if I try to do the same plot without loading the data. I thought it would be a good idea to open a new thread because the problem doesn’t link to the original question anymore.
Did you use the Docker environment from my December fork for local testing and debugging? Or at least a virtualenv? Otherwise it will be an endless trial and error if you don’t have a clean local environment.
I forked your repo and tried to figure out the problem. At the beginning i got segmentation faults and tons of HDF5 error messages. That’s probably why the streamlit app on streamlit cloud crashed without any noticeable error message.
After some research i suspected that the binary python wheels of the different packages have some incompatibilities. So I added the dev headers and forced the suspicious packages to be built by pip from the sources. Et voila, the errors were gone.
O wow thank you so much! It works like a charm! I don’t think I would have ever figured this out myself, I’ll have to look at those Docker environments (have never used that before).
Wow, this is amazing debug skills, and generosity with your time!
Thank you @Franky1!! I had been trying to help @Isolde IRL, but this really stumped us. So, just dropping my appreciate here, especially as it also gives us some insight on how to approach future issues as we deploy our apps.