I have met this error when run my hello.py

Hi, All.

I have met this error when run my hello.py.
File “hello.py”, line 4, in
imgui.new_frame()
File “imgui/core.pyx”, line 1413, in imgui.core.new_frame
imgui.core.ImGuiError: ImGui assertion error (GImGui != NULL && “No current context. Did you call ImGui::CreateContext() or ImGui::SetCurrentContext()?”) at imgui-cpp/imgui.cpp:3083

my code :

import imgui

imgui.new_frame()

imgui.begin(“Your first window!”, True)

imgui.text(“Hello world!”)

imgui.end()

imgui.render()
imgui.end_frame()

What’s wrong to me ?
I installed ingui with “pip3 install imgui” in my mac.

My Machine:
MacPro5.1, MacOSX Mojave, Python 3.7.x.

Thanks.
Best,
@bemoregt.

Well, the error says did you call ImGui::CreateContext() and you didn’t…

1 Like

??

That is the c++ code…

In python level, What do I do?

Thanks.
@bemoregt.

Call whatever is the equivalent function in your Python binding.