tylerjrichards / st-paywall

A python package for creating subscription Streamlit apps
MIT License
235 stars 46 forks source link

st.experimental_get_query_params is deprecated, we need to update to st.query_params #56

Closed marcosberghahn closed 2 months ago

marcosberghahn commented 5 months ago

Hello everyone, st.experimental_get_query_params is deprecated, we need to update to st.query_params.

Old Docs: https://docs.streamlit.io/library/api-reference/utilities/st.experimental_get_query_params New Docs:https://docs.streamlit.io/library/api-reference/utilities/st.query_params

https://github.com/tylerjrichards/st-paywall/blob/35dd9b4a29ddf8b704f7abaf14714644292d482a/src/st_paywall/google_auth.py#L84

aryaneelshivam commented 5 months ago

Yes, I was about to raise the same issue

tylerjrichards commented 5 months ago

hey all, thanks for the note! st paywall is on an older streamlit version, so when I update it i'll require streamlit >= 1.31 or something like that

marcosberghahn commented 5 months ago

Yes, that's the Idea, I'm already on 1.31, so I'm getting these notifications here. Screenshot 2024-02-21 at 10 37 18 I was able to disable them for prod environment, but since I have other features that also use query params, I can't update them until st-paywall is updated as well. Otherwise Streamlit yells at me, saying I can't use the old and the new at the same time. I definitely would submit a PR to help on this, but my "junior skills" prevented me to make this one work 😀. So If someone could help and submit a PR, I will be a very grateful pal, one beer on me next time we meet.

AbdielWillyar commented 4 months ago

hi, same issues. but i try to find the code and try to replace the old version, but i think the author for this library must update, so the library not show conflict in future

tobibuchmann commented 3 months ago

Hi, I installed st-paywall from github and testet with different versions of streamlit, but I always get:

Please replace st.experimental_get_query_params with st.query_params.

st.experimental_get_query_params will be removed after 2024-04-11.

Refer to our docs page for more information.

hahnsangkim commented 3 months ago

Line 84 in google_auth.py Replacing query_params = st.experimental_get_query_params() by query_params = st.query_params will work out fine.

j-bull2003 commented 2 months ago

Please fix this issue!

tylerjrichards commented 2 months ago

this is fixed in 0.1.7! let me know if it works for you all

j-bull2003 commented 2 months ago

Hey there, now strangely I am getting this error: TypeError: QueryParamsProxy.get_all() missing 1 required positional argument: 'key' - does anyone else have this issue?

tylerjrichards commented 2 months ago

I merged @blackary's PR and tested it this morning, while I was testing the first PR I was actually was testing it on the wrong version of st-paywall. This should rectify! 0.1.8 should be better.

j-bull2003 commented 2 months ago

Thanks! However, I am still getting this Type error: TypeError: QueryParamsProxy.get_all() missing 1 required positional argument: 'key'

sfc-gh-zblackwood commented 2 months ago

Hi @j-bull2003 can you double-check that you're installing and running 0.1.8? That function is no longer used in the code for 0.1.8

j-bull2003 commented 2 months ago

Hi, it is still showing the same error that I mentioned before, and I uninstalled and then reinstalled 0.1.8, so I'm sure I am on the correct version..

j-bull2003 commented 2 months ago

Apologies @sfc-gh-zblackwood, it is working now, I hadn't re-run streamlit run app.py - thank you for the assistance and it is a great feature!