Hi, I used geopandas to get a geo-dataset from a geojson (link). Until now it worked properly, but yesterday I got this error message
I thought there was some issue with the link, but I tried it on Jupyter and it works perfectly.
Thanks in advance, Luigi
ps. the code below
import geopandas as gpd
@st.cache_data()
def get_data():
df_raw = gpd.read_file('https://maps.amsterdam.nl/open_geodata/geojson_lnglat.php?KAARTLAAG=WONINGBOUWPLANNEN&THEMA=woningbouwplannen')
df_raw = df_raw[df_raw.Start_bouw!=0]
return df_raw
Hi @Luigi_Giugliano,
Is this issue still occurring when you remove the @st.cache_data()
decorator?
Thanks,
Charly
Thank you for confirming. Which version of Streamlit did your app use to work with?
Also, would it be possible for you to send us the code, please?
Best,
Charly
This is the requirement file

I think that in this way it’s the last version. Actually it’s quite weird because in Jupyter works fine.
Anyway I have solved the issue just by loading the a geojson file in GitHub and then using this code
@st.cache_data()
def get_data():
df_raw = geopandas.read_file(“data.geojson”)
df_raw = df_raw[df_raw.Start_bouw!=0]
return df_raw
This works properly.
here is the app link.
[Amterdam woonplaan · Streamlit (jeggino-amsterdam-wookingplaan-app-ahqwac.streamlit.app)
You can arrive at the entire code
Glad to hear you managed to sort this issue Luigi!
Best wishes,
Charly
system
Closed
8
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.