Hello guys. I have a some problem. I made python program and used tkinter for GUI. My program auto start when raspberry pi start. Normally my program work good. But If I use terminal, I take tcl Error. Main problem appear when I use watchdog.py. When my program begin I take this error and rpi reboot itself(Watchdog work). If I don't use watchdog.py, there is no problem, my GUI work fine. I overcome this error for use watchdog.py. My entire of error, below:
Code: Select all
File "/home/pi/Petra/PGUI.py", line 348, in <module>
root=Tk()
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1823, in __init__
self.tk=_tkinter.create(screenName, baseName, className,interactive, want object, useTk, sync, use)
TclError: no display name and no $DISPLAY environment variable
I try write 'export DISPLAY=0.0' into '/etc/rc.local' this time my rpi stack on login. I want to exceed this error but I could not yet.
How can I fix this problem? Any suggestion. Thanks your time.
Regards.