Skip to content

Cannot run dlt-init-openapi with config file #137

@guaripete-github

Description

@guaripete-github
uvx dlt-init-openapi RESTAPIConfig --path swagger.json --no-interactive --config config.yml
# config.yml
package_name: "other_package_name"
│ C:\Users\\source\packages\uv\archive-v0\5RAkPrAP9mb4osILE-BX3\Lib\site-packages\dlt_init_openapi\config.py:88 in load_from_path                                                                     │
│                                                                                                                                                                                                             │
│   85 │   │   │   config_data = json.loads(path.read_text())                                   ╭────────────────────────── locals ───────────────────────────╮                                               │
│   86 │   │   else:                                                                            │        args = ()                                            │                                               │
│   87 │   │   │   config_data = yaml.safe_load(path.read_text())                               │ config_data = {'package_name': 'other_package_name'}        │                                               │
│ ❱ 88 │   │   config = Config(**config_data, **kwargs)                                         │      kwargs = {                                             │                                               │
│   89 │   │   return config                                                                    │               │   'project_name': 'RESTAPIConfig',          │                                               │
│   90                                                                                          │               │   'package_name': 'RESTAPIConfig',          │                                               │
│                                                                                               │               │   'output_path': None,                      │                                               │
│                                                                                               │               │   'endpoint_filter': None,                  │                                               │
│                                                                                               │               │   'global_limit': 0,                        │                                               │
│                                                                                               │               │   'spec_url': None,                         │                                               │
│                                                                                               │               │   'spec_path': WindowsPath('swagger.json'), │                                               │
│                                                                                               │               │   'allow_openapi_2': False                  │                                               │
│                                                                                               │               }                                             │                                               │
│                                                                                               │        mime = None                                          │                                               │
│                                                                                               │        path = WindowsPath('config.yml')                     │                                               │
│                                                                                               ╰─────────────────────────────────────────────────────────────╯                                               │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: dlt_init_openapi.config.Config() got multiple values for keyword argument 'package_name'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions