Skip to content

binary stdout/stderr handling #1130

@arieleiz

Description

@arieleiz

_watch_pipe_fd() decodes the incoming data from the pipe using str::decode(). By default this passed the strict errors flag to the unicode engine. However, if the pipe command returns binary data this will through a UnicodeError exception.
We change the code to explicitly pass the replace errors flag, which will replace the output with output that can be displayed on screen.
We also specify the buffer size as a constant so it can be changed for edge cases where the task pipes a lot of output/error text.

Pull request has been submitted: Bugfix: binary stdout/stderr handling #1129: https://github.com/ipython/ipykernel/pull/1129/files

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