-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
$ arazzo-generator generate openapi.json -o ./output.yaml WARNING:root:Failed to load Pydantic config: Configuration file not found: /tmp/config.toml. Ensure that config.toml has not been removed or moved.
ERROR:arazzo_generator.cli.main:Generation failed: cannot access local variable 'log_cfg' where it is not associated with a value
Traceback (most recent call last):
File "/tmp/.venv/lib/python3.12/site-packages/arazzo_generator/cli/main.py", line 99, in generate
setup_logging(log_level=log_level)
File "/tmp/.venv/lib/python3.12/site-packages/arazzo_generator/utils/logging.py", line 39, in setup_logging
if "file" in log_cfg.get("destinations", []):
^^^^^^^
UnboundLocalError: cannot access local variable 'log_cfg' where it is not associated with a value
Couple of things seems off here
1. We should be able to run generator without config. It should be able to fallback to some defaults
2. The error is reporting about pydantic config, which is incorrect
IMHO generator SHOULD run without any config file with some same defaults and we should provide -c / --config option to load the config from custom location.
Reactions are currently unavailable