mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-01-24 06:08:53 +01:00
Display names of problematic story JSON files
This commit is contained in:
parent
cfb622b47f
commit
cbdf3fa037
@ -67,14 +67,14 @@ def getstoryfiles():
|
|||||||
try:
|
try:
|
||||||
js = json.load(f)
|
js = json.load(f)
|
||||||
except:
|
except:
|
||||||
print("Browser loading error: Story file is malformed or not a JSON file.")
|
print(f"Browser loading error: {file} is malformed or not a JSON file.")
|
||||||
f.close()
|
f.close()
|
||||||
continue
|
continue
|
||||||
f.close()
|
f.close()
|
||||||
try:
|
try:
|
||||||
ob["actions"] = len(js["actions"])
|
ob["actions"] = len(js["actions"])
|
||||||
except TypeError:
|
except TypeError:
|
||||||
print("Browser loading error: Story file has incorrect format.")
|
print(f"Browser loading error: {file} has incorrect format.")
|
||||||
continue
|
continue
|
||||||
list.append(ob)
|
list.append(ob)
|
||||||
return list
|
return list
|
||||||
|
Loading…
Reference in New Issue
Block a user