Page config error when running a Streamlit script from inside another

My folder structure:


Both apps have a config set at the top. I run and once a user is authenticated, authorise will use exec(open(project/ to send that user to the app

The problem is that once a user gets authenticated, I get a set_page_config error telling me it needs to be set only once per page

I’m pretty sure this worked when I ran it about a week or so ago. Not sure what went wrong

Works when I remove page config from app1. Seems like it’s not being treated as its own app; rather a continuation of the first script that’s run. Running authorise without config and app1 with config doesn’t work either