Explorar o código

Windows doesn't like : in filenames

oobabooga %!s(int64=3) %!d(string=hai) anos
pai
achega
2207d44986
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server.py

+ 1 - 1
server.py

@@ -564,7 +564,7 @@ if args.chat or args.cai_chat:
         return _history
 
     def save_history():
-        fname = f"{character or ''}{'_' if character else ''}{datetime.now().strftime('%Y%m%d-%H:%M:%S')}.json"
+        fname = f"{character or ''}{'_' if character else ''}{datetime.now().strftime('%Y%m%d-%H%M%S')}.json"
         if not Path('logs').exists():
             Path('logs').mkdir()
         with open(Path(f'logs/{fname}'), 'w') as f: