LemmaLegalConsulting / docassemble-Covid19debt

A docassemble extension.
MIT License
0 stars 0 forks source link

Error when adding a second debt #86

Closed nonprofittechy closed 2 years ago

nonprofittechy commented 2 years ago

I tried adding a mortgage debt as the second debt and triggered this error message:

[Error](https://interviews.lemmalegal.com/run/Covid19debt/DebtReport/#)

    [admin@lemmalegal.com](https://interviews.lemmalegal.com/run/Covid19debt/DebtReport/#)

Error

[Retry](https://interviews.lemmalegal.com/run/Covid19debt/DebtReport/#)

    Interview has an error. There was a reference to a variable 'debt[1].emergency_dict_temp' 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.

History
Ran initial code at 0.00200s

id: set currency
initial: True
code: |
  set_locale(currency_symbol='£')

Tried to run mandatory code at 0.00201s

id: interview order
mandatory: True
code: |
  user_saw_introduction
  user_saw_preparation 
  debt_signpost 
  user.name.first
  user.name.last
  if user.dob.plus(years=18) > today():
    under18_kickout
  if not user.uk:
    nonUKresident_kickout
  if not user.uk_debt:
    nonUKdebt_kickout
  user.work
  user.uk_debt
  #user_provided_personal_info
  user.house_status 
  if user.house_status == 'Renting': 
    if user.renting_status == 'Joint tenants': 
      user.house_status_rentshare
  if user.house_status == 'Home owner': 
    if user.homeowner_status == 'Joint Mortgage':
      user.house_status_mortshare
  if user.house_status == 'Living with family':
    share_housing = True
  if user.house_status == 'Homeless': 
    share_housing = False
    user.house_num = 1 
    user.house_aware = False
  if share_housing == True: 
    user.house_num
  else: 
    user.house_num = 1
  if user.house_status == 'Homeless': 
    user_contact_information_homeless
  else:
    user_contact_information
  user.marriage

  current_insolvency
  debt_info_signpost

  # user_identified_priority_debts
  # user_identified_nonpriority_debts
  debt_parent_list[0]
  debt.total()
  finance_signpost
  jobs.total()
  other_income.total()
  assets.total()
  add_review_to_menu = True
  expenses.total()
  # documents_uploaded
  summary
  signpost_bs_solutions
  user_saw_standard_bs
  user_saw_mentalh_bs
  user_saw_debt_solutions
  # user_signed
  predocx_variables
  letter_and_end

Needed definition of debt[1].complete at 0.00216s
Tried to run block at 0.00232s

id: Debt complete order
generic object: Debt
code: |
  x.type
  x.value
  x.creditor
  x.name
  if temp_other_name_exists:
    x.other_name = temp_other_name
  x.urgency
  x.priority
  x.court_action
  x.first_miss_date
  x.notes
  x.complete = True

Needed definition of debt[1].urgency at 0.00244s
Tried to run block at 0.00260s

id: calculates .urgency from .urgency_reason if appropriate
generic object: Debt
code: |
  if len(x.emergency_dict.true_values()) > 0:
    x.urgency = x.emergency_dict.true_values().comma_and_list()
  else:
    x.urgency = "None"

Needed definition of debt[1].emergency_dict at 0.00270s
Considered using block at 0.00286s

if: number_of_emergency_choices > 1
generic object: Debt
question: Emergency information about ${ x.name }
subquestion: |
  Are you at risk of any of the following?  Check any that apply.
fields:
  - no label: x.emergency_dict
    datatype: checkboxes
    code: |
      x.emergency_choices

Tried to run block at 0.00289s

sets: x.emergency_dict
generic object: Debt
code: |
  x.initializeAttribute('emergency_dict', DADict.using(auto_gather=False,gathered=True))
  x.emergency_dict[x.emergency_choices[0]] = x.emergency_dict_temp

Needed definition of debt[1].emergency_dict_temp at 0.00305s

[Show variables and values](https://interviews.lemmalegal.com/vars?i=docassemble.Covid19debt%3Adata%2Fquestions%2FDebtReport.yml)
nonprofittechy commented 2 years ago

This was against the latest version main that is on GitHub