SuffolkLITLab / docassemble-MAVirtualCourt

Project which currently holds code for the Doc Assembly Line project, including dependencies for actual interviews.
Other
7 stars 5 forks source link

Court Email not found crashing due to logs #766

Closed BryceStevenWilley closed 3 years ago

BryceStevenWilley commented 3 years ago

I was installing a newer version of the Civil Docketing Statement on prod, and for checked the logs really quick, and found this error happening in prod. Looks like it's at https://github.com/SuffolkLITLab/docassemble-MAVirtualCourt/blob/4317007336ade941c69674d90bf9209523f8c245/docassemble/MAVirtualCourt/data/questions/basic-questions.yml#L1185, because the court email is None, but we're just crashing instead of handling that better. User outcome might look the same, but we should probably figure out what's the issue here, and maybe do a quick fix here, or just start porting more interviews to AssemblyLine.

docassemble: ip=146.115.161.214 i=docassemble.AffidavitofIndigencyMAVC:data/questions/affidavit.yml uid=R0qZwnTr6jtxtLH22rRZOvLuhuKPAhz9 user=REDACTED 2021-08-02 05:39:36 Traceback (most recent call last):   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 7502, in assemble     exec(run_process_action, user_dict)   
File "<code block>", line 1, in <module>   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/functions.py", line 3535, in process_action     force_ask(event_info['action'])   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/functions.py", line 3291, in force_ask     raise ForcedNameError(*the_pargs, user_dict=get_user_dict()) docassemble.base.error.ForcedNameError: form_delivery_complete  During handling of the above exception, another exception occurred:  Traceback (most recent call last):   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 8319, in askfor     exec_with_trap(question, user_dict)   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 8931, in exec_with_trap     exec(the_question.compute, the_dict)   
File "<code block>", line 3, in <module> NameError: name 'email_status' is not defined  During handling of the above exception, another exception occurred:  Traceback (most recent call last):   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 8354, in askfor     return question.ask(user_dict, old_user_dict, the_x, iterators, missing_var, origMissingVariable)   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 4846, in ask     eval(need_code, user_dict)   
File "<need expression>", line 1, in <module> NameError: name 'sent_email_to_court' is not defined  During handling of the above exception, another exception occurred:  
Traceback (most recent call last):   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request     rv = self.dispatch_request()   File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request     return self.view_functions[rule.endpoint](**req.view_args)   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/webapp/server.py", line 7532, in index     interview.assemble(user_dict, interview_status, old_user_dict, force_question=special_question)   File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 7870, in assemble     raise the_error   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 7659, in assemble     question_result = self.askfor(missingVariable, user_dict, old_user_dict, interview_status, seeking=interview_status.seeking, follow_mc=follow_mc, seeking_question=seeking_question)   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 8436, in askfor     question_result = self.askfor(newMissingVariable, user_dict, old_user_dict, interview_status, variable_stack=variable_stack, questions_tried=questions_tried, seeking=seeking, follow_mc=follow_mc, recursion_depth=recursion_depth, seeking_question=seeking_question)   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 8436, in askfor     question_result = self.askfor(newMissingVariable, user_dict, old_user_dict, interview_status, variable_stack=variable_stack, questions_tried=questions_tried, seeking=seeking, follow_mc=follow_mc, recursion_depth=recursion_depth, seeking_question=seeking_question)   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 8319, in askfor     exec_with_trap(question, user_dict)   
File "/usr/share/docassemble/local3.8/lib/python3.8/site-packages/docassemble/base/parse.py", line 8931, in exec_with_trap     exec(the_question.compute, the_dict)   
File "<code block>", line 12, in <module> TypeError: can only concatenate str (not "NoneType") to str
nonprofittechy commented 3 years ago

This one (affidavit of indigency) is already ported to AL but it sends to court so I think the smallest fix is the way to go. Don't want to rock the boat.