debug my program, here is powershell output log of my python program:
晚上好 From: wxid(privcy mask) To: wxid(privcy mask) 'type': 1
ask:晚上好
Exception in thread Thread-7:
Traceback (most recent call last):
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\multithread\threads.py", line 23, in run
item.play()
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\basic\task.py", line 69, in play
self.reply += self.bot.ask(prompt=self.prompt, access_internet=self.access,
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\services\chat\ChatGPTAPI.py", line 188, in ask
self.truncate_conversation()
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\services\chat\ChatGPTAPI.py", line 110, in truncate_conversation
if (self.get_token_count() > self.max_tokens) and (len(self.conversation) > 1):
File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\services\chat\ChatGPTAPI.py", line 92, in get_token_count
encoding = tiktoken.encoding_for_model(self.engine)
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\model.py", line 75, in encoding_for_model
return get_encoding(encoding_name)
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\registry.py", line 63, in get_encoding
enc = Encoding(**constructor())
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken_ext\openai_public.py", line 64, in cl100k_base
mergeable_ranks = load_tiktoken_bpe(
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\load.py", line 117, in load_tiktoken_bpe
return {
File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\load.py", line 117, in
return {
ValueError: not enough values to unpack (expected 2, got 1)
python 3.10 powershell 管理员权限
debug my program, here is powershell output log of my python program: 晚上好 From: wxid(privcy mask) To: wxid(privcy mask) 'type': 1 ask:晚上好 Exception in thread Thread-7: Traceback (most recent call last): File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\multithread\threads.py", line 23, in run item.play() File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\basic\task.py", line 69, in play self.reply += self.bot.ask(prompt=self.prompt, access_internet=self.access, File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\services\chat\ChatGPTAPI.py", line 188, in ask self.truncate_conversation() File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\services\chat\ChatGPTAPI.py", line 110, in truncate_conversation if (self.get_token_count() > self.max_tokens) and (len(self.conversation) > 1): File "E:\LLaMs\Wechat_auto-reply\ChatGPT-weBot\services\chat\ChatGPTAPI.py", line 92, in get_token_count encoding = tiktoken.encoding_for_model(self.engine) File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\model.py", line 75, in encoding_for_model return get_encoding(encoding_name) File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\registry.py", line 63, in get_encoding enc = Encoding(**constructor()) File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken_ext\openai_public.py", line 64, in cl100k_base mergeable_ranks = load_tiktoken_bpe( File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\load.py", line 117, in load_tiktoken_bpe return { File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\tiktoken\load.py", line 117, in
return {
ValueError: not enough values to unpack (expected 2, got 1)