You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The https://docs.python.org/3/library/string.html#string.Template.substitute method will throw a KeyError if values are missing, which is fine, but results in confusing behaviour for a user who sees an error message from the underlying implementation detail. This exception should be caught and have a friendlier message emitted from this library
Example of trace:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/amrish/miniconda3/envs/pedro2/lib/python3.11/site-packages/env_templating/templating.py", line 63, in update_environment_variables
_write_env_file_with_substitutions(temp_output_file_path, template, substitutions)
File "/home/amrish/miniconda3/envs/pedro2/lib/python3.11/site-packages/env_templating/templating.py", line 23, in _write_env_file_with_substitutions
new_env_fp.write(env_template.substitute(substitutions))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/amrish/miniconda3/envs/pedro2/lib/python3.11/string.py", line 121, in substitute
return self.pattern.sub(convert, self.template)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/amrish/miniconda3/envs/pedro2/lib/python3.11/string.py", line 114, in convert
return str(mapping[named])
~~~~~~~^^^^^^^
KeyError: 'DB_HOST'
The text was updated successfully, but these errors were encountered:
The https://docs.python.org/3/library/string.html#string.Template.substitute method will throw a KeyError if values are missing, which is fine, but results in confusing behaviour for a user who sees an error message from the underlying implementation detail. This exception should be caught and have a friendlier message emitted from this library
Example of trace:
The text was updated successfully, but these errors were encountered: