Unable to load a secondary page

I’m running this locally on Windows via streamlit run main.py. Using Streamilt 1.36.0 and Python 3.11.8

Project structure:

│   config.py
│   main.py
├───pages
│       match_info.py

match_info can be opened normally from the sidebar, but opening it from a new tab in browser doesn’t work. It just seems to be loading forever.

main.py

import re
import streamlit as st
import pandas as pd
import psycopg2
import config

conn = psycopg2.connect(
    host=config.database_host,
    port=config.database_port,
    user=config.database_user,
    password=config.database_password,
    database=config.database_name
)

st.title("Matches")

# Probably should use caching
df = pd.read_sql("""
-- Some SQL
""", conn) 
st.dataframe(df)

conn.close()

pages/match_info.py

import streamlit as st

st.set_page_config(page_title="Match info", page_icon="🏠", initial_sidebar_state="collapsed")
st.title("Match Info")

Here what the webpage shows

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