Unanswered
Hello Chris,
I would need some more informaton. I would need how you are calling self.wedge_address_configs and the full stack trace. I would expect: self.wedge_address_configs['Cognito_Url'] to work.
Looking at the SDK code:
def _validate_db_configs(self, db_config_list: DbConfigList):
"""
Raises exception if required WEDGE_ADDRESS_CONFIGS are not set
"""
bad_config = False
# Sanity-check the config to make sure all expected keys are now set.
for key in [x.name for x in self.WEDGE_ADDRESS_CONFIGS.required]:
if key not in db_config_list:
bad_config = True
self.logger.error('Q2_WedgeAddress.Config missing key: %s.' % key)
# If anything went wrong, fail.
if bad_config:
self.logger.error(
'DbConfigs Misconfigured. Try running `q2 update_installed -e %s`' % (
self.extension_name
)
)
raise exceptions.ConfigurationError('Q2_WedgeAddress.Config Misconfigured')
So the only way that error can happen is if the key is not in the db_config
47 Views
0
Answers
4 years ago
4 years ago
I was expecting that to work as well. We are calling it as follows:
cognito_url = self.wedge_address_configs['Cognito_Url']
...and here is the stack trace:
— Chris Janes 4 years agoTraceback (most recent call last):
— Chris Janes 4 years agoFile "/home/cjanes@inter-val.ai/sdk/.env/lib/python3.8/site-packages/tornado/web.py", line 1713, in _execute
result = await result
File "./IntervalSSORequestHandler/extension.py", line 94, in get
cognito_url = self.wedge_address_configs['Cognito_Url']
File "/home/cjanes@inter-val.ai/sdk/.env/lib/python3.8/site-packages/q2_sdk/core/http_handlers/hq_handler.py", line 147, in wedge_address_configs
return self.db_config
File "/home/cjanes@inter-val.ai/sdk/.env/lib/python3.8/site-packages/q2_sdk/core/http_handlers/hq_handler.py", line 156, in db_config
— Chris Janes 4 years agoself._validate_db_configs(_db_config)
File "/home/cjanes@inter-val.ai/sdk/.env/lib/python3.8/site-packages/q2_sdk/core/http_handlers/hq_handler.py", line 142, in _validate_db_configs
raise exceptions.ConfigurationError('Q2_WedgeAddress.Config Misconfigured')
q2_sdk.core.exceptions.ConfigurationError: Q2_WedgeAddress.Config Misconfigured