mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-29 15:44:12 +00:00
upgraded exception reporting
This commit is contained in:
parent
822b6cc61f
commit
deb2d2d9d2
8
app.py
8
app.py
@ -507,7 +507,13 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
try:
|
||||
self.model = self.binding.build_model()
|
||||
except Exception as ex:
|
||||
print(f"Couldn't load model: [{ex}]")
|
||||
# Catch the exception and get the traceback as a list of strings
|
||||
traceback_lines = traceback.format_exception(type(ex), ex, ex.__traceback__)
|
||||
|
||||
# Join the traceback lines into a single string
|
||||
traceback_text = ''.join(traceback_lines)
|
||||
ASCIIColors.error(f"Couldn't load model: [{ex}]")
|
||||
ASCIIColors.error(traceback_text)
|
||||
return jsonify({ "status":False, 'error':str(ex)})
|
||||
|
||||
print("update_settings : New model selected")
|
||||
|
Loading…
x
Reference in New Issue
Block a user