SystemRage / py-kms

KMS Server Emulator written in Python
The Unlicense
2.07k stars 634 forks source link

latest build python3 error when running pykms_Server.py #25

Closed roadrage999 closed 5 years ago

roadrage999 commented 5 years ago

Module tkinter is being called but is not a default installation option with python:

apt install python3-tk resolved the issue but a default git pull and minimal system build does not contain this module.

same results with python2 running so not isolated to 3 on debian

Error below

py_kms_GuiBase.py line 16 in module import tkinter as tk ImportError: No module named tkinter

CirnoT commented 5 years ago

Please do note that this will now not work without DISPLAY when not in TTY. script can be used to go around this: /usr/bin/script -qfc "/usr/bin/python /opt/py-kms/pykms_Server.py -V DEBUG -F /var/log/py-kms_server.log" /dev/null

May 15 11:17:56 mio python[4385]: Traceback (most recent call last):
May 15 11:17:56 mio python[4385]:   File "/opt/py-kms/pykms_Server.py", line 266, in <module>
May 15 11:17:56 mio python[4385]:     srv_main_with_gui()
May 15 11:17:56 mio python[4385]:   File "/opt/py-kms/pykms_Server.py", line 197, in srv_main_with_gui
May 15 11:17:56 mio python[4385]:     root = pykms_GuiBase.KmsGui()
May 15 11:17:56 mio python[4385]:   File "/opt/py-kms/pykms_GuiBase.py", line 77, in __init__
May 15 11:17:56 mio python[4385]:     tk.Tk.__init__(self, *args, **kwargs)
May 15 11:17:56 mio python[4385]:   File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1823, in __init__
May 15 11:17:56 mio python[4385]:     self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
May 15 11:17:56 mio python[4385]: _tkinter.TclError: no display name and no $DISPLAY environment variable
SystemRage commented 5 years ago

@roadrage999 try now, bypassed that import.

roadrage999 commented 5 years ago

removed python3-tk package and did a fresh pull, everything working as it did previously on a debian install