mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-03 19:07:42 +01:00
Show full stack trace for generator errors to help in diagnosing errors
This commit is contained in:
parent
2687135e05
commit
9097aac4a8
@ -21,6 +21,7 @@ import collections
|
||||
import zipfile
|
||||
import packaging
|
||||
import contextlib
|
||||
import traceback
|
||||
from typing import Any, Union, Dict, Set, List
|
||||
|
||||
import requests
|
||||
@ -2280,7 +2281,7 @@ def generate(txt, minimum, maximum, found_entries=None):
|
||||
print("{0}{1}{2}".format(colors.YELLOW, "Lua engine stopped; please open 'Userscripts' and press Load to reinitialize scripts.", colors.END), file=sys.stderr)
|
||||
else:
|
||||
emit('from_server', {'cmd': 'errmsg', 'data': 'Error occured during generator call, please check console.'}, broadcast=True)
|
||||
print("{0}{1}{2}".format(colors.RED, str(e).replace("\033", ""), colors.END), file=sys.stderr)
|
||||
print("{0}{1}{2}".format(colors.RED, traceback.format_exc().replace("\033", ""), colors.END), file=sys.stderr)
|
||||
set_aibusy(0)
|
||||
return
|
||||
|
||||
@ -2491,7 +2492,7 @@ def tpumtjgenerate(txt, minimum, maximum, found_entries=None):
|
||||
print("{0}{1}{2}".format(colors.YELLOW, "Lua engine stopped; please open 'Userscripts' and press Load to reinitialize scripts.", colors.END), file=sys.stderr)
|
||||
else:
|
||||
emit('from_server', {'cmd': 'errmsg', 'data': 'Error occured during generator call, please check console.'}, broadcast=True)
|
||||
print("{0}{1}{2}".format(colors.RED, str(e).replace("\033", ""), colors.END), file=sys.stderr)
|
||||
print("{0}{1}{2}".format(colors.RED, traceback.format_exc().replace("\033", ""), colors.END), file=sys.stderr)
|
||||
set_aibusy(0)
|
||||
return
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user