Skip to content

Python 3.11 crashes in some cases when loguru.logger.exception called #775

Closed
@gabus

Description

@gabus

I'm sorry as I can't provide example but after digging into code the only change which is needed

formatter_record["exception"] = "".join(lines)
change to
formatter_record["exception"] = "".join(str(lines))
in loguru._handler.Handler.emit

it seems python 3.11 doesn't like implicit casting.
Though I'm second guessing my solution - don't know why it works..

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamThis is not our bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions