Skip to content

assertion failure at Objects/call.c:618: PyObject *callmethod(PyThreadState *, PyObject *, const char *, struct __va_list_tag *): Assertion 'callable != NULL' failed. #142737

Description

@YuanchengJiang

Crash report

What happened?

import builtins
import sys

def test_import(name, *args, **kwargs):
    sys.modules[name] = object()
    return sys.modules[name]

builtins.__import__ = test_import

raise RuntimeError("Test")
python: ../Objects/call.c:618: PyObject *callmethod(PyThreadState *, PyObject *, const char *, struct __va_list_tag *): Assertion `callable != NULL' failed.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

No response

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions