Skip to content

Python client generated with 2.4.21 does not handle download of binary data (UTF-8 decode issue) #931

@IAmWebSA

Description

@IAmWebSA
swagger: '2.0'
/get/zip:
    get:
      summary: Get a zip file
      description: Zip File
      produces:
        - application/octet-stream
        - application/json
      responses:
        '200':
          description: Zip File
          schema:
            type: file
        '401':
          description: Access denied 
        '403':
          description: Access forbidden 
        '500':
          description: Fatal Error

Error which I get when response is processed:

'utf-8' codec can't decode byte 0x9a in position 10: invalid start byte rest.py", line 222, in request

Failing code part in rest.py:

# we need to decode it to string. if six.PY3: r.data = r.data.decode('utf8')

Is there an error in my extract of the yaml?
Or is this still a bug in the codegen?

Many thanks in advance

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