I follow the tutorial at readme file but when I run
streamlit run app.py
I got the following error: login() missing 1 required positional argument: 'form_name'. I have also created config.yaml file based on the example provided.
My entire code is attached below:
import yaml
from yaml.loader import SafeLoader
import streamlit_authenticator as stauth
import streamlit as st
with open('config.yaml') as file:
config = yaml.load(file, Loader=SafeLoader)
authenticator = stauth.Authenticate(
config['credentials'],
config['cookie']['name'],
config['cookie']['key'],
config['cookie']['expiry_days'],
config['preauthorized']
)
authenticator.login()
if st.session_state["authentication_status"]:
authenticator.logout()
st.write(f'Welcome *{st.session_state["name"]}*')
st.title('Some content')
elif st.session_state["authentication_status"] is False:
st.error('Username/password is incorrect')
elif st.session_state["authentication_status"] is None:
st.warning('Please enter your username and password')
'form_name' is related to 'fields' parameter but there is a default value for it based on the documentation. Have I missed anything?
The version of streamlit-authenticator that I use is 0.2.1
I follow the tutorial at readme file but when I run
I got the following error: login() missing 1 required positional argument: 'form_name'. I have also created config.yaml file based on the example provided.
My entire code is attached below:
'form_name' is related to 'fields' parameter but there is a default value for it based on the documentation. Have I missed anything?
The version of streamlit-authenticator that I use is 0.2.1