In lambda_function.py, there are two different names for "actionable". The extra "n" should be removed from "actionnable". In addition, once that issue has been fixed, some statements will throw an error due to accessing the session_attributes dictionary using attribute access notation rather than item access notation.
For example, on lines 134 - 136 and 304 - 306, the code currently checks the session_attr for a key that will never exist with the existing code. But if the key was fixed, changing it to "actionable_history" when stored, such that it did exist, that key is retrieved as if it were an attribute, which throws an error "AttributeError: 'dict' object has no attribute 'actionnable_history'". Therefore:
actionnable_history = list()
if('actionable_history' in session_attr.keys()):
actionnable_history = session_attr.actionnable_history
should be:
actionable_history = list()
if 'actionable_history' in session_attr:
actionable_history = session_attr['actionable_history']
or even:
actionable_history = session_attr['actionable_history'] if 'actionable_history' in session_attr else list()
In lambda_function.py, there are two different names for "actionable". The extra "n" should be removed from "actionnable". In addition, once that issue has been fixed, some statements will throw an error due to accessing the session_attributes dictionary using attribute access notation rather than item access notation.
For example, on lines 134 - 136 and 304 - 306, the code currently checks the session_attr for a key that will never exist with the existing code. But if the key was fixed, changing it to "actionable_history" when stored, such that it did exist, that key is retrieved as if it were an attribute, which throws an error "AttributeError: 'dict' object has no attribute 'actionnable_history'". Therefore:
should be:
or even: