HumanbiOS / QA-module

1 stars 0 forks source link

KeyError #1

Closed scholtde closed 4 years ago

scholtde commented 4 years ago

Issue with transition from C0 to CZ in methods:

{'_lang': 'en', 'id': 'C0', 'text': 'Have you had close contact with a confirmed case?', 'comment': 'Close contact with a confirmed case means:\nFace-to-face contact for longer than 15 minutes\nDirect, physical contact (touching, shaking hands, kissing)\nBeing within 1.5 meters of the person for more than 15 minutes\nContact with or exchange of body fluids\nLiving in the same apartment\n\nChoose "No" if you have worn adequate protective measures (mask, smock) on contact.', 'free': False, 'answers': {'Yes': 'CZ', 'No': 'S0'}, 'multi': False}

{'_lang': 'en', 'id': 'CZ', 'text': 'What day was the last contact?', 'comment': False, 'free': True, 'answers': 'S0', 'multi': False}

Traceback (most recent call last): File "/home/dewald/rasa_env/lib/python3.6/site-packages/sanic/app.py", line 976, in handle_request response = await response File "app.py", line 136, in handle_message handle_fb_message(data) File "app.py", line 169, in handle_fb_message conversation_handler(sender_id) File "app.py", line 521, in conversation_handler medical_assessment(sender_id) File "app.py", line 931, in medical_assessment response = get_next_question(sender_id, "en", current_question) File "/home/dewald/projects/humanbios/fb/modules/qa_module/methods.py", line 71, in get_next_question if old_question.score[next_question_id] > 0: KeyError: 'C0'

Poolitzer commented 4 years ago

Closed in caf1e3c