dborodin836 / TF2-GPTChatBot

An AI-powered chatbot for Team Fortress 2 fans and players.
GNU General Public License v3.0
13 stars 1 forks source link

Error with time.py #92

Closed teufortressIndustries closed 8 months ago

teufortressIndustries commented 8 months ago

I was using TF2-GPTChatBot as usual, and I got this issue the next time I tried to get a response. I have no idea how to fix it and what caused it to suddenly pop up. Console log:

Exception in thread Thread-1 (parse_console_logs_and_build_conversation_history):
Traceback (most recent call last):
  File "C:\AIstuff\TF2-GPTChatBot\modules\utils\time.py", line 43, in get_minutes_from_str
    struct_time = time.strptime(time_str, "%H:%M:%S")
  File "C:\Users\M8705\AppData\Local\Programs\Python\Python310\lib\_strptime.py", line 562, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "C:\Users\M8705\AppData\Local\Programs\Python\Python310\lib\_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '2:' does not match format '%H:%M:%S'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\M8705\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "C:\Users\M8705\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "C:\AIstuff\TF2-GPTChatBot\modules\chat.py", line 67, in parse_console_logs_and_build_conversation_history
    for logline in get_console_logline():
  File "C:\AIstuff\TF2-GPTChatBot\modules\utils\text.py", line 210, in get_console_logline
    stats_regexes(line)
  File "C:\AIstuff\TF2-GPTChatBot\modules\utils\text.py", line 164, in stats_regexes
    tm = get_minutes_from_str(time_on_server)
  File "C:\AIstuff\TF2-GPTChatBot\modules\utils\time.py", line 46, in get_minutes_from_str
    struct_time = time.strptime(time_str, "%M:%S")
  File "C:\Users\M8705\AppData\Local\Programs\Python\Python310\lib\_strptime.py", line 562, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "C:\Users\M8705\AppData\Local\Programs\Python\Python310\lib\_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '2:' does not match format '%M:%S'