GBLS / docassemble-MACourts

List Massachusetts Courts in Docassemble
MIT License
5 stars 11 forks source link

(Production error) Trying to call `lower` on a list #39

Closed BryceStevenWilley closed 2 years ago

BryceStevenWilley commented 2 years ago

Related to this code: https://github.com/GBLS/docassemble-MACourts/blob/master/docassemble/MACourts/macourts.py#L639

Full log inside ```log AttributeError: AttributeError: 'list' object has no attribute 'lower' Traceback (most recent call last): File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 7978, in assemble exec_with_trap(question, user_dict) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 9329, in exec_with_trap exec(the_question.compute, the_dict) File "", line 4, in NameError: name 'ask_affidavit_questions' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8709, in askfor exec_with_trap(question, user_dict) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 9329, in exec_with_trap exec(the_question.compute, the_dict) File "", line 24, in NameError: name 'all_matches' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/webapp/server.py", line 8058, in index interview.assemble(user_dict, interview_status, old_user_dict, force_question=special_question) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8259, in assemble raise the_error File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8046, 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.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8824, 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.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8709, in askfor exec_with_trap(question, user_dict) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 9329, in exec_with_trap exec(the_question.compute, the_dict) File "", line 1, in File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/MACourts/macourts.py", line 346, in matching_courts return self.matching_courts_single_address(address, court_types) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/MACourts/macourts.py", line 375, in matching_courts_single_address res = court_type_map[court_type](address) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/MACourts/macourts.py", line 639, in matching_probate_and_family_court courts.update([court for court in self.elements if court.name.rstrip().lower() == court_item.lower()]) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/MACourts/macourts.py", line 639, in courts.update([court for court in self.elements if court.name.rstrip().lower() == court_item.lower()]) AttributeError: 'list' object has no attribute 'lower' The referer URL was https://apps.suffolklitlab.org/run/indigency/ Traceback (most recent call last): File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 7978, in assemble exec_with_trap(question, user_dict) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 9329, in exec_with_trap exec(the_question.compute, the_dict) File "", line 4, in NameError: name 'ask_affidavit_questions' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8709, in askfor exec_with_trap(question, user_dict) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 9329, in exec_with_trap exec(the_question.compute, the_dict) File "", line 24, in NameError: name 'all_matches' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/webapp/server.py", line 8058, in index interview.assemble(user_dict, interview_status, old_user_dict, force_question=special_question) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8259, in assemble raise the_error File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8046, 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.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8824, 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.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 8709, in askfor exec_with_trap(question, user_dict) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/base/parse.py", line 9329, in exec_with_trap exec(the_question.compute, the_dict) File "", line 1, in File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/MACourts/macourts.py", line 346, in matching_courts return self.matching_courts_single_address(address, court_types) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/MACourts/macourts.py", line 375, in matching_courts_single_address res = court_type_map[court_type](address) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/MACourts/macourts.py", line 639, in matching_probate_and_family_court courts.update([court for court in self.elements if court.name.rstrip().lower() == court_item.lower()]) File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/MACourts/macourts.py", line 639, in courts.update([court for court in self.elements if court.name.rstrip().lower() == court_item.lower()]) AttributeError: 'list' object has no attribute 'lower' The external hostname was apps.suffolklitlab.org ```