X12 Configuration Defaults Are Not Applied
dixonwhitmire opened this issue · comments
Dixon Whitmire commented
The linuxforhealth-x12 library uses Pydantic for data modeling and settings management. When linuxforhealth-x12 is installed as a library for use by a larger application, the configuration defaults for settings management are not applied
File "/Users/ebaron/whpoc/cdpx12_poc/x12fhir/src/main/cdp_x12_to_fhir/x12_to_fhir_converter.py", line 6, in test_x12_to_fhir_converter
with X12ModelReader(x12file) as r:
File "/usr/local/lib/python3.8/site-packages/x12/io.py", line 157, in __enter__
self._x12_segment_reader.__enter__()
File "/usr/local/lib/python3.8/site-packages/x12/io.py", line 78, in __enter__
self._buffer_size: int = get_config().x12_reader_buffer_size
File "/usr/local/lib/python3.8/site-packages/x12/config.py", line 59, in get_config
return X12Config()
File "pydantic/env_settings.py", line 36, in pydantic.env_settings.BaseSettings.__init__
File "pydantic/main.py", line 406, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for X12Config
x12_character_set
field required (type=value_error.missing)