使用时遇到问题"索引构建失败"请问如何解决? #622
Unanswered
Sqqqqqqqqqqqqqqqqqqqqqq
asked this question in
Q&A
Replies: 1 comment
-
需要先把文档转换成常见的文档格式…….chm也太不常见了,程序没法直接读。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To create a public link, set
share=True
inlaunch()
.2023-04-13 04:03:32,038 [INFO] [models.py:416] 正在加载OpenAI模型: gpt-3.5-turbo
2023-04-13 04:03:32,038 [INFO] [models.py:445] 模型设置为了: gpt-3.5-turbo
2023-04-13 04:03:40,580 [INFO] [base_model.py:263] 输入为:你好
2023-04-13 04:03:45,663 [INFO] [base_model.py:325] 回答为:你好!
2023-04-13 04:03:56,620 [INFO] [base_model.py:263] 输入为:请问你是GPT4吗
2023-04-13 04:04:03,009 [INFO] [base_model.py:325] 回答为:不好意思,我不是GPT-4,我是OpenAI的GPT-3预训练语言模型的一部分,被训练用于回答各种问题和完成各种任务。
2023-04-13 04:05:18,761 [INFO] [base_model.py:263] 输入为:请使用GEEM2引擎编写一段角色每秒获得200经验的脚本
2023-04-13 04:05:18,775 [INFO] [base_model.py:185] 加载索引中……(这可能需要几分钟)
2023-04-13 04:05:23,705 [INFO] [llama_func.py:50] loading file: GeeM2引擎帮助文档.CHM
2023-04-13 04:05:23,707 [ERROR] [llama_func.py:88] Error loading file: GeeM2引擎帮助文档.CHM
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\llama_func.py", line 135, in construct_index
documents = get_documents(file_src)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\llama_func.py", line 90, in get_documents
text = add_space(text_raw)
UnboundLocalError: local variable 'text_raw' referenced before assignment
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\py\lib\logging_init_.py", line 1098, in emit
msg = self.format(record)
File "D:\py\lib\logging_init_.py", line 942, in format
return fmt.format(record)
File "D:\py\lib\logging_init_.py", line 678, in format
record.message = record.getMessage()
File "D:\py\lib\logging_init_.py", line 368, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "D:\py\lib\threading.py", line 966, in _bootstrap
self._bootstrap_inner()
File "D:\py\lib\threading.py", line 1009, in _bootstrap_inner
self.run()
File "D:\py\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\py\lib\site-packages\gradio\utils.py", line 491, in async_iteration
return next(iterator)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\utils.py", line 39, in predict
for i in iter:
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\base_model.py", line 271, in predict
limited_context, old_inputs, display_append, inputs = self.prepare_inputs(inputs=inputs, use_websearch=use_websearch, files=files, reply_language=reply_language)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\base_model.py", line 187, in prepare_inputs
index = construct_index(self.api_key, file_src=files)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\llama_func.py", line 157, in construct_index
logging.error("索引构建失败!", e)
Message: '索引构建失败!'
Arguments: (UnboundLocalError("local variable 'text_raw' referenced before assignment"),)
local variable 'text_raw' referenced before assignment
Traceback (most recent call last):
File "D:\py\lib\site-packages\gradio\routes.py", line 395, in run_predict
output = await app.get_blocks().process_api(
File "D:\py\lib\site-packages\gradio\blocks.py", line 1193, in process_api
result = await self.call_function(
File "D:\py\lib\site-packages\gradio\blocks.py", line 930, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\py\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\py\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "D:\py\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\py\lib\site-packages\gradio\utils.py", line 491, in async_iteration
return next(iterator)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\utils.py", line 39, in predict
for i in iter:
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\base_model.py", line 271, in predict
limited_context, old_inputs, display_append, inputs = self.prepare_inputs(inputs=inputs, use_websearch=use_websearch, files=files, reply_language=reply_language)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\base_model.py", line 188, in prepare_inputs
assert index is not None, "索引构建失败"
AssertionError: 索引构建失败
2023-04-13 04:08:15,548 [INFO] [models.py:416] 正在加载OpenAI模型: gpt-3.5-turbo
2023-04-13 04:08:15,549 [INFO] [models.py:445] 模型设置为了: gpt-3.5-turbo
2023-04-13 04:17:58,804 [INFO] [base_model.py:263] 输入为:请驶入编写一段角色每秒获得200经验的脚本
2023-04-13 04:17:58,818 [INFO] [base_model.py:185] 加载索引中……(这可能需要几分钟)
2023-04-13 04:17:58,825 [INFO] [llama_func.py:50] loading file: GeeM2引擎帮助文档.CHM
2023-04-13 04:17:58,827 [ERROR] [llama_func.py:88] Error loading file: GeeM2引擎帮助文档.CHM
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\llama_func.py", line 135, in construct_index
documents = get_documents(file_src)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\llama_func.py", line 90, in get_documents
text = add_space(text_raw)
UnboundLocalError: local variable 'text_raw' referenced before assignment
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\py\lib\logging_init_.py", line 1098, in emit
msg = self.format(record)
File "D:\py\lib\logging_init_.py", line 942, in format
return fmt.format(record)
File "D:\py\lib\logging_init_.py", line 678, in format
record.message = record.getMessage()
File "D:\py\lib\logging_init_.py", line 368, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "D:\py\lib\threading.py", line 966, in _bootstrap
self._bootstrap_inner()
File "D:\py\lib\threading.py", line 1009, in _bootstrap_inner
self.run()
File "D:\py\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\py\lib\site-packages\gradio\utils.py", line 491, in async_iteration
return next(iterator)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\utils.py", line 39, in predict
for i in iter:
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\base_model.py", line 271, in predict
limited_context, old_inputs, display_append, inputs = self.prepare_inputs(inputs=inputs, use_websearch=use_websearch, files=files, reply_language=reply_language)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\base_model.py", line 187, in prepare_inputs
index = construct_index(self.api_key, file_src=files)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\llama_func.py", line 157, in construct_index
logging.error("索引构建失败!", e)
Message: '索引构建失败!'
Arguments: (UnboundLocalError("local variable 'text_raw' referenced before assignment"),)
local variable 'text_raw' referenced before assignment
Traceback (most recent call last):
File "D:\py\lib\site-packages\gradio\routes.py", line 395, in run_predict
output = await app.get_blocks().process_api(
File "D:\py\lib\site-packages\gradio\blocks.py", line 1193, in process_api
result = await self.call_function(
File "D:\py\lib\site-packages\gradio\blocks.py", line 930, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\py\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\py\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "D:\py\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\py\lib\site-packages\gradio\utils.py", line 491, in async_iteration
return next(iterator)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\utils.py", line 39, in predict
for i in iter:
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\base_model.py", line 271, in predict
limited_context, old_inputs, display_append, inputs = self.prepare_inputs(inputs=inputs, use_websearch=use_websearch, files=files, reply_language=reply_language)
File "C:\Users\Sq\Desktop\2 (2)\ChuanhuChatGPT-main\modules\base_model.py", line 188, in prepare_inputs
assert index is not None, "索引构建失败"
AssertionError: 索引构建失败
Beta Was this translation helpful? Give feedback.
All reactions