Hi, I’m having problems with Tkinter in Panda3D. After the Code I’m explaining the issue.
from panda3d.core import *
load_prc_file("data/engine_cfg.prc")
from direct.showbase.ShowBase import ShowBase
from Tkinter import *
import sys, os
from engine import panSave
class Engine(ShowBase):
def __init__(self):
ShowBase.__init__(self)
#Ui
self.setUp_UI()
def setUp_UI(self):
self.spawnTkLoop()
menu = Menu(self.tkRoot)
file_menu = Menu(menu)
self.tkRoot.config(menu=menu)
menu.add_cascade(label="File", menu=file_menu)
file_menu.add_command(label="Save", command=panSave.save)
engine = Engine()
engine.run()
Note: the panSave.save function does only print “Hello” so far. I’ve also tried it with a simple function, that also prints “Hello” and is in the same Class, so the function shouldnt be the problem.
Is this Code I’m getting this Error after klicking on the “Save” submenu:
Fatal Python error: PyEval_RestoreThread: NULL tstate
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
AL lib: (EE) alc_cleanup: 1 device not closed
Process finished with exit code 3
How can I solve this problem?