mkhorasani / Streamlit-Authenticator

A secure authentication module to manage user access in a Streamlit application.
Other
1.66k stars 258 forks source link

NameError: name 'SafeLoader' is not defined #18

Closed jitvimol closed 2 years ago

jitvimol commented 2 years ago

ymal config loader might depreciated? I try running the code and there's an error about "Loader=SafeLoader" I switch to new code below and found working.

with open('user.ymal') as file:

config = yaml.load(file, Loader=SafeLoader) # previous code, not working

config = yaml.safe_load(file)   # new code (working)

SNAG-0087

mkhorasani commented 2 years ago

Yes please ensure you are using PyYAML >= 5.3.1. Regards.

batmanscode commented 2 years ago

Hi @mkhorasani I'm having this same issue even after upgrading PyYAML

batmanscode commented 2 years ago

Hi @mkhorasani I'm having this same issue even after upgrading PyYAML

Worked after I added from yaml import SafeLoader

jitvimol commented 2 years ago

Hi @mkhorasani I'm having this same issue even after upgrading PyYAML

Worked after I added from yaml import SafeLoader

Confirm that it works. Thank you!