JohnZ03 Chuan Hu commited on
Commit
196c2e9
·
unverified ·
1 Parent(s): 11750f0

Fix encoding error in utils.py (#882)

Browse files

* Fix encoding error in utils.py

Non-ASCII colon sign being used and causing error on local deployment during every localhost startup.

* Update utils.py

---------

Co-authored-by: Chuan Hu <[email protected]>

Files changed (1) hide show
  1. modules/utils.py +1 -1
modules/utils.py CHANGED
@@ -668,7 +668,7 @@ def new_auto_history_filename(username):
668
  with open(os.path.join(HISTORY_DIR, username, latest_file + ".json"), 'r', encoding="utf-8") as f:
669
  if len(f.read()) == 0:
670
  return latest_file
671
- now = i18n("新对话 ") + datetime.datetime.now().strftime('%m-%d %H꞉%M')
672
  return f'{now}.json'
673
 
674
  def get_history_filepath(username):
 
668
  with open(os.path.join(HISTORY_DIR, username, latest_file + ".json"), 'r', encoding="utf-8") as f:
669
  if len(f.read()) == 0:
670
  return latest_file
671
+ now = i18n("新对话 ") + datetime.datetime.now().strftime('%m-%d %H-%M')
672
  return f'{now}.json'
673
 
674
  def get_history_filepath(username):