NaomiProject / Naomi

The Naomi Project is an open source, technology agnostic platform for developing always-on, voice-controlled applications!
https://projectnaomi.com/
MIT License
242 stars 47 forks source link

NoneType does not support item assignment #413

Closed aaronchantrill closed 2 weeks ago

aaronchantrill commented 2 weeks ago

Description

When using yaml.safe_load() on an empty text file, the returned value is None rather than an empty dictionary as I expected. This caused an error when adding the first value, as I would get the error message "NoneType object does not support item assignment".

Expected Behavior

Whether an empty profile.yml file exists or has to be created should not matter. Either way the _profile variable should be initialized as an empty dictionary.