HelloZeroNet/ZeroNet · info
Here is your console
Error message
Here is your console
What it means
actionConsole is a built-in developer console endpoint that eval()s arbitrary code sent by the UI. After executing, it deliberately raises Exception('Here is your console') to terminate the request — this 'error' is the control-flow mechanism used to end the console response, not a real failure. It only occurs when the console feature is used (typically when enabled for local development).
Source
Thrown at src/Ui/UiRequest.py:879
self.sendHeader()
return [b"No error! :)"]
# Just raise an error to get console
def actionConsole(self):
import sys
sites = self.server.sites
main = sys.modules["main"]
def bench(code, times=100, init=None):
sites = self.server.sites
main = sys.modules["main"]
s = time.time()
if init:
eval(compile(init, '<string>', 'exec'), globals(), locals())
for _ in range(times):
back = eval(code, globals(), locals())
return ["%s run: %.3fs" % (times, time.time() - s), back]
raise Exception("Here is your console")
# - Tests -
def actionTestStream(self):
self.sendHeader()
yield " " * 1080 # Overflow browser's buffer
yield "He"
time.sleep(1)
yield "llo!"
# yield "Running websockets: %s" % len(self.server.websockets)
# self.server.sendMessage("Hello!")
# - Errors -
# Send bad request error
def error400(self, message=""):
self.sendHeader(400, noscript=True)
self.log.error("Error 400: %s" % message)View on GitHub (pinned to 454c0b2e7e)
Solutions
- Treat this exception as the console's normal response terminator and read the computed result from the response body, not the exception
- Disable/avoid exposing actionConsole in production; guard it behind authentication or remove the route
- If wrapping requests in try/except, whitelist this message so it isn't reported as a failure
- Upgrade or patch UiRequest so the console returns its result directly instead of raising
Defensive patterns
Strategy: try-catch
Try / catch
try:
result = request_console(code)
except Exception as e:
if "Here is your console" in str(e):
pass # expected control-flow termination, handle result normally
else:
raise Prevention
- Do not enable the console endpoint in production builds
- Whitelist this message in error reporting/monitoring
- Treat console responses as data, not failures
- Wrap console calls in a helper that swallows this specific exception
When it happens
Trigger: Calling the UiWebsocket/UiRequest console action (e.g. via the ZeroNet console UI or POSTing to the console route); the exception is raised intentionally after the eval loop returns its result.
Common situations: Developers using ZeroNet's interactive console during development; automated tests or scripts hitting the console endpoint; production deployments that accidentally left the console enabled.
Related errors
AI-assisted analysis of HelloZeroNet/ZeroNet@454c0b2e7e (2026-09-02).
Data as JSON: /api/errors/428b6260dc2ebb53.
Report an issue: GitHub.