sqlmapproject/sqlmap · error · SqlmapSystemException
unable to create GUI window
Error message
unable to create GUI window ('%s') What it means
Raised in the GUI constructor when tk.Tk() cannot create a root window — typically no display is available (headless/SSH session without X forwarding) or the Tkinter installation is broken. The underlying exception text is embedded.
Solutions
- Run on a machine with a display or forward X (ssh -X)
- Install/repair the tkinter package and a Tk runtime
- Use the CLI or the ncurses TUI instead of the GUI
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at lib/utils/gui.py:424 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26).
Data as JSON: /api/errors/d67b42361d667873.
Report an issue: GitHub.
Appendix: source
Thrown at lib/utils/gui.py:424
self.controlsByDest = {} # dest -> [(pane name, interactive widget)]
self.searchMatches = []
self.process = None
self.processQueue = None
self.processConfigFile = None
self.consoleWindow = None
self.consoleText = None
self.consoleStatus = None
self._runSerial = 0
self._refreshJob = None
self._searchJob = None
self._headerJob = None
self._suspendRefresh = False
try:
self.window = tk.Tk()
except Exception as ex:
raise SqlmapSystemException("unable to create GUI window ('%s')" % getSafeExString(ex))
self.tooltip = _TooltipManager(self, self.window, tk, PALETTE)
self._initializeVariables()
self._initFonts()
self._initStyle()
self._buildLayout()
self.window.protocol("WM_DELETE_WINDOW", self._closeApplication)
def _initializeVariables(self):
for dest in self.optionOrder:
option = self.optionByDest[dest]
isBool = not _optTakesValue(option)
otype = "bool" if isBool else _optValueType(option)
default = defaults.get(dest)
if isBool:
var = self.tk.BooleanVar(value=bool(default))
else:
var = self.tk.StringVar(value="" if default in (None, False) else default)View on GitHub (pinned to 0a35b20e39)