Multipage application

Hallo there, i am developing a new multipage application and when invoking the st.Page, I am getting an error:

Attribute Error There is no st.Page

a sample code for the application i am developing.

st.set_page_config(
    page_title="Genome analyzer",
    page_icon="Universitat Potsdam",
    layout="centered",
    initial_sidebar_state="expanded")
st.image("https://www.uni-potsdam.de/typo3conf/ext/up_template/Resources/Public/Images/logos/up_logo_international_2.png", width=100)
st.header("Genome analyzer Universitat Potsdam")
st.subheader(
    "Developed by Gaurav Sablok, Academic Staff Member, Bioinformatics, Universitat Potsdam, Germany")

analyze_genes = st.Page("analyzegenes.py", title="Analyze Genes",
                        icon=":material/add_circle:")
analyze_genome = st.Page(
    "analyzegenome.py", title="Analyze Genome", icon=":material/add_circle:")
analyze_genomeannotations = st.Page(
    "analyzegenomeannotations.py", title="Analyze genome annotations", icon=":material/add_circle:")
analyze_gff = st.Page("analyzegff.py", title="Analyze genome gff",
                      icon=":material/add_circle:")

Thank you for the help and time.
Gaurav

Hi @gauravcodepro, welcome to the forum!

Most likely you are using an older version of streamlit.

You can check by running streamlit --version or by adding a line in your app like this

st.write(st.__version__)

st.Page was only introduced in streamlit 1.36, so older versions will not support it.

If you’re running into this issue locally, you can do pip install streamlit>=1.36.0

If you’re running into it on community cloud, you can update requirements.txt (or however you are specifying dependencies) to have a line that says streamlit>=1.36.0

Thank you for the reply and i am going now to work on this.

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