"Key <key name> not found in 'DomainMetadataForm'

Hi Everyone,

After few fight with commcare-cloud, i finally finish to deploy my first and fresh CommecareHQ instance.
But my Application team is facing some issue, during Linked project push option (pull option is working well).
I tried to follow the debug and i saw this.

Traceback (most recent call last):
File "/home/cchq/www/monolith/releases/2023-06-08_19.35/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/releases/2023-06-08_19.35/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'call_center_case_owner' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."
2023-06-23 12:38:25,146 WARNING [root] Could not resolve form field 'call_center_case_type'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/releases/2023-06-08_19.35/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'call_center_case_type'

Do you have some suggestion on it?

Hello Michael,

That error is unexpected. What is the UI error you get when you do a project push?
Also, is this the error you get on the push operation. To get the corresponding error, you can watch the django.log as you perform the push operation.

As a first step could you do a code deploy and see if it disappears. Here are the docs Managing The Deployment — CommCareHQ Deployment documentation. If that doesn't work and you get the same error please report back here.

Thanks
Sravan

Hi Sravan,

Thanks for your update.
I made the cope deploy, and this log is still in django.log after a retry.
Any clue?

Best

Hi @Mguirimand

Do you perhaps have a larger stacktrace?

Sure :

2023-06-30 10:56:38,989 WARNING [root] Could not resolve form field 'call_center_enabled'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'call_center_enabled'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'call_center_enabled' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."
2023-06-30 10:56:38,990 WARNING [root] Could not resolve form field 'call_center_type'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'call_center_type'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'call_center_type' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."
2023-06-30 10:56:38,991 WARNING [root] Could not resolve form field 'call_center_case_owner'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'call_center_case_owner'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'call_center_case_owner' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."
2023-06-30 10:56:38,992 WARNING [root] Could not resolve form field 'call_center_case_type'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'call_center_case_type'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'call_center_case_type' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."
2023-06-30 10:56:38,992 WARNING [root] Could not resolve form field 'mobile_ucr_sync_interval'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'mobile_ucr_sync_interval'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'mobile_ucr_sync_interval' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."
2023-06-30 10:56:38,993 WARNING [root] Could not resolve form field 'confirmation_link_expiry'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'confirmation_link_expiry'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'confirmation_link_expiry' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."
2023-06-30 10:56:38,993 WARNING [root] Could not resolve form field 'operator_call_limit'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'operator_call_limit'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'operator_call_limit' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."
2023-06-30 10:56:38,993 WARNING [root] Could not resolve form field 'confirmation_sms_project_name'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'confirmation_sms_project_name'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'confirmation_sms_project_name' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."
2023-06-30 10:56:39,002 WARNING [root] Could not resolve form field 'cloudcare_releases'.
Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 153, in getitem
field = self.fields[name]
KeyError: 'cloudcare_releases'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/crispy_forms/utils.py", line 70, in render_field
bound_field = form[field]
File "/home/cchq/www/monolith/current/python_env-3.9/lib/python3.9/site-packages/django/forms/forms.py", line 155, in getitem
raise KeyError(
KeyError: "Key 'cloudcare_releases' not found in 'DomainMetadataForm'. Choices are: default_geocoder_location, default_timezone, delete_logo, hr_name, logo, project_description, release_mode_visibility."