-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:query-paramsRelated to `st.query_params`Related to `st.query_params`priority:P1High priority - fix within two weeksHigh priority - fix within two weeksstatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expectedtype:regressionThis bug is a regression from previous behaviorThis bug is a regression from previous behavior
Description
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
User can not get right query_params before rerun.
Reproducible Code Example
import streamlit as st
st.experimental_set_query_params(param=3)
st.write(st.experimental_get_query_params())Steps To Reproduce
Run script, {"param ": 3} will not appear at first time until rerun script after querystring in browser already changed.
Expected Behavior
Show {"param ": 3}
Current Behavior
show empty dict
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.20.0
- Python version: 3.10.6
- Operating System: Linux
- Browser: Chrome
- Virtual environment: None
Additional Information
In previous version set_query_params will set ctx.query_string = parse.urlencode(query_params, doseq=True) immediately.
But in 1.20, this line is removed while get_query_params still get if from ctx.query_string .
Are you willing to submit a PR?
- Yes, I am willing to submit a PR!
Metadata
Metadata
Assignees
Labels
feature:query-paramsRelated to `st.query_params`Related to `st.query_params`priority:P1High priority - fix within two weeksHigh priority - fix within two weeksstatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expectedtype:regressionThis bug is a regression from previous behaviorThis bug is a regression from previous behavior