Skip to content

python complains about BaseException being unsafe #347

@yogo1212

Description

@yogo1212
  File "../lib/python3.8/site-packages/chameleon/exc.py", line 321, in __call__
    exc = create_formatted_exception(exc, type(exc), exc._original__str__)
  File "../lib/python3.8/site-packages/chameleon/utils.py", line 227, in create_formatted_exception
    inst = cls.__new__(new)
TypeError: BaseException.__new__(SyntaxError) is not safe, use SyntaxError.__new__()
        try:
            inst = BaseException.__new__(new)
        except TypeError:
            inst = cls.__new__(new)     # line 227

        BaseException.__init__(inst, *exc.args)
        inst.__dict__ = exc.__dict__

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions