Please take a moment to search the forum and documentation before posting a new topic.
If you’re creating a debugging post, please include the following info:
- Are you running your app locally or is it deployed? yes
- If your app is deployed:
a. Is it deployed on Community Cloud or another hosting platform?
b. Share the link to the public deployed app. - Share the link to your app’s public GitHub repository (including a requirements file).
- Share the full text of the error message (not a screenshot).
- Share the Streamlit and Python versions. - Streamlit, version 1.41.1 and Python 3.9.19
Code with old api showing URL with Params
DEFAULT_PARAMS = {
"route_number": "1106",
"route_date": "2024-11-18",
"database_name_identifier": "TRUX_M3_COMP",
}
query_params = st.experimental_get_query_params()
route_number = query_params.get("route_number", DEFAULT_PARAMS["route_number"])
route_date = query_params.get("route_date", DEFAULT_PARAMS["route_date"])
database_name_identifier = query_params.get("database_name_identifier", DEFAULT_PARAMS["database_name_identifier"])
if not query_params:
st.experimental_set_query_params(
route_number=route_number,
route_date=route_date,
database_name_identifier=database_name_identifier,
)
But when I changed to latest api, url is not coming with params
query_params = st.query_params
route_number = query_params.get("route_number", [DEFAULT_PARAMS["route_number"]])[0]
route_date = query_params.get("route_date", [DEFAULT_PARAMS["route_date"]])[0]
database_name_identifier = query_params.get("database_name_identifier", [DEFAULT_PARAMS["database_name_identifier"]])[0]
if not query_params:
st.query_params = {
"route_number": route_number,
"route_date": route_date,
"database_name_identifier": database_name_identifier,
}
I m not sure what m I missing.