URL buttons not working on community cloud app

hey there! deployed my first community cloud app the other day!

I have a couple st.button components that open other links on the web, which work great locally, but seem to not have any effect when using the deployed app via SCC. The logic is pretty basic:

        if st.button("Open this project in another page"):
            url = URLS["explore"].format(**{
                'url': st.session_state.url,
                'account_id': st.session_state.account_id,
                'project_id': selected_project.projectId,
                'page': ''
            })
            print("opening: " + url)
            webbrowser.open_new_tab(url)

I threw that print() in there for debugging purposes, and don’t see that in the logs on the deployed app at all. Anything I should try to debug?

Hey @dave-connors-3,

Unfortunately, this is a known limitation – instead, you can create a link via the following:

link = '[my link](http://streamlit.io)'
st.markdown(link, unsafe_allow_html=True)

We are also planning to release a feature to fulfill this need in the next few months, hopefully!

And now it is known to me! thanks so much for the update Caroline!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.