Skip to content

UnicodeDecodeError if message cannot be decoded as UTF-8 and using debug log #265

Description

@fxzjshm

At client.py

.format(self.bind_address_string, repr(str(msg))))

a str(msg) is called if logger is set to debug level, but in core.py

return byte_str.decode('utf-8')

if using python3 and the message is just some bytes which cannot be decoded as UTF-8, an UnicodeDecodeError is thrown.

A workaround is just set logger level to info, but I'm wondering is it considered a bug, and is there any better options?

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