Unable to understand the reason for error


switch_page : 🖱️ Switch page function - streamlit-extras
on using the switch_page(“faceauthentication”) present in widgets.py
i am getting this error: Could not find page faceauthentication. Must be one of [‘app’]
how do i resolve this?

code for ‘faceauthentication.py’:

import numpy as np 
import streamlit as st
from .utils import register_new_usr


def start():
    arr = st.session_state.cur_usr
    st.title("Welcome " + arr['name'])
    # 0 for webcam feed ; add "path to file" 
    # for detection in video file 
    st.write("Add Face for Authentication")
    #st.markdown('1. Press esc to exit \n 2. Press Space when face is ready to be captured')
    result = False
    #stuff`Preformatted text`

    if result:
          img_vector = np.array([-1])
        st.error('User already exists in the DB indedtity theft is a crime', icon="🚨")


Hi @rojox74767

To use switch_page it seems you may need to make your Streamlit app a multi-page, please structure your app like the one should here: GitHub - dataprofessor/multipage-app-starter-kit

Notice that the main page is 🏠_Home.py while the other pages in your app should be in a folder called pages then inside this pages folder you can have several other pages such as your faceauthentication.py page.

Finally, you can use switch_page("faceauthentication").