Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

KeyError when generating v3 python sdk #2

@josh-oakes

Description

@josh-oakes

When trying to generate the python sdk against an openapi3 spec swagger json I'm getting the following error (swagger file attached)...

Stacktrace:

ERROR: [main.Process:51] Python generator raised an exception
Traceback (most recent call last):
  File "C:\Users\joakes\.autorest\@[email protected]\node_modules\@autorest\python\autorest\jsonrpc\server.py", line 49, in Process
    return plugin.process()
  File "C:\Users\joakes\.autorest\@[email protected]\node_modules\@autorest\python\autorest\init.py", line 54, in process
    self.update_yaml(yaml_data)
  File "C:\Users\joakes\.autorest\@[email protected]\node_modules\@autorest\python\autorest\namer\init.py", line 25, in update_yaml
    NameConverter.convert_yaml_names(yaml_data)
  File "C:\Users\joakes\.autorest\@[email protected]\node_modules\@autorest\python\autorest\namer\name_converter.py", line 25, in convert_yaml_names
    NameConverter._convert_operation_groups(yaml_data['operationGroups'], yaml_data['info']['pascal_case_title'])
  File "C:\Users\joakes\.autorest\@[email protected]\node_modules\@autorest\python\autorest\namer\name_converter.py", line 57, in _convert_operation_groups
    NameConverter._convert_language_default_python_case(parameter, pad_string=PadType.Parameter)
  File "C:\Users\joakes\.autorest\@[email protected]\node_modules\@autorest\python\autorest\namer\name_converter.py", line 136, in _convert_language_default_python_case
    schema_description = schema["language"]["default"]["description"].strip()
KeyError: 'description'
  Error: Plugin namer reported failure.

Autorest Info:

$ autorest --info
AutoRest code generation utility [cli version: 3.0.6187; node: v12.18.1, max-memory: 8192 gb]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest


Showing All Installed Extensions

 Type       Extension Name                           Version      Location
 core       @autorest/core                           3.0.6306     C:\Users\joakes\.autorest\@[email protected]
 extension  @autorest/modelerfour                    4.15.410     C:\Users\joakes\.autorest\@[email protected]
 extension  @autorest/python                         5.2.0-preview.1 C:\Users\joakes\.autorest\@[email protected]
 core       @microsoft.azure/autorest-core           2.0.4417     C:\Users\joakes\.autorest\@[email protected]
 extension  @microsoft.azure/autorest.modeler        2.3.44       C:\Users\joakes\.autorest\@[email protected]
 extension  @microsoft.azure/autorest.python         3.0.62       C:\Users\joakes\.autorest\@[email protected]

The error is a bit generic and I'm not really sure what to look for. Any information that would point me in the right direction would be appreciated!

swagger.txt

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