SuffolkLITLab / docassemble-ALDashboard

A frontend to a few common administrative backend functions that aren't built-in to Docassemble
MIT License
8 stars 0 forks source link

Update and install packages without requiring an API key #59

Closed nonprofittechy closed 2 years ago

nonprofittechy commented 2 years ago

Remove dependency on API key for package install and update dashboards. Also--add the dispatch directives to the config instead of making author copy and paste.

Fix #58 Fix #34

BryceStevenWilley commented 2 years ago

Tested this on a fresh docassemble server, got the following error in the background worker task:

Error in assembly: DAErrorMissingVariable: Interview has an error. There was a reference to a variable 'install_from_github_url' that could not be looked up in the question file (for language 'en') or in any of the files incorporated by reference into the question file.: [' File "/usr/share/docassemble/local3.10/lib/python3.10/site-packages/docassemble/webapp/worker.py", line 1154, in background_action

Rest of error message interview.assemble(user_dict, interview_status) 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 8761, in askfor raise DAErrorMissingVariable("Interview has an error. There was a reference to a variable \'" + origMissingVariable + "\' that could not be looked up in the question file (for language \'" + str(language) + "\') or in any of the files incorporated by reference into the question file.", variable=origMissingVariable)

Unfortunately, the interview also didn't check the result of the background task, and just said "there are the links to reach your interviews", when those links were broken.

Should fix the error, and additionally, check if the background task was successful or not when showing the final screen to make sure we don't confuse other server admins.

BryceStevenWilley commented 2 years ago

Install works fine for me now, thanks!