From e9a6efef7fb5b53e4616bd8e3d346348aaad640c Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 22 Apr 2023 15:39:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=9E=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E7=9A=84=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/解析项目源代码.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crazy_functions/解析项目源代码.py b/crazy_functions/解析项目源代码.py index 5563d3b..bfa473a 100644 --- a/crazy_functions/解析项目源代码.py +++ b/crazy_functions/解析项目源代码.py @@ -293,7 +293,7 @@ def 解析任意code项目(txt, llm_kwargs, plugin_kwargs, chatbot, history, sys return # 若上传压缩文件, 先寻找到解压的文件夹路径, 从而避免解析压缩文件 maybe_dir = [f for f in glob.glob(f'{project_folder}/*') if os.path.isdir(f)] - if maybe_dir[0].endswith('.extract'): + if len(maybe_dir)>0 and maybe_dir[0].endswith('.extract'): extract_folder_path = maybe_dir[0] else: extract_folder_path = project_folder