mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix for action count on new version of save file
This commit is contained in:
17
fileops.py
17
fileops.py
@@ -96,11 +96,18 @@ def getstoryfiles():
|
|||||||
f.close()
|
f.close()
|
||||||
continue
|
continue
|
||||||
f.close()
|
f.close()
|
||||||
try:
|
if 'file_version' in js:
|
||||||
ob["actions"] = len(js["actions"])
|
try:
|
||||||
except TypeError:
|
ob["actions"] = int(js["actions"]["action_count"])+1
|
||||||
print(f"Browser loading error: {file} has incorrect format.")
|
except TypeError:
|
||||||
continue
|
print(f"Browser loading error: {file} has incorrect format.")
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
ob["actions"] = len(js["actions"])
|
||||||
|
except TypeError:
|
||||||
|
print(f"Browser loading error: {file} has incorrect format.")
|
||||||
|
continue
|
||||||
list.append(ob)
|
list.append(ob)
|
||||||
return list
|
return list
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user