binary-husky/gpt_academic

[Bug]: 输入文件的路径存在,但位置非法。请将文件上传后再执行该任务。

zhiqing0205 opened this issue · 5 comments

Installation Method | 安装方法与平台

Docker-Compose(Linux)

Version | 版本

Latest | 最新版

OS | 操作系统

Docker

Describe the bug | 简述

输入文件的路径 (../root/arxiv_cache/2312.04521/extract) 存在,但位置非法。请将文件上传后再执行该任务。
载入缓存和不载入都尝试了
之前是可以正常进行arxiv论文精细翻译的

Screen Shot | 有帮助的截图

image

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023)
kpathsea version 6.3.5
Copyright 2023 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.39; using libpng 1.6.39
Compiled with zlib 1.2.13; using zlib 1.2.13
Compiled with xpdf version 4.04
Successfully extracted tar archive to /root/arxiv_cache/2312.04521/extract
pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023)
kpathsea version 6.3.5
Copyright 2023 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.39; using libpng 1.6.39
Compiled with zlib 1.2.13; using zlib 1.2.13
Compiled with xpdf version 4.04
Successfully extracted tar archive to /root/arxiv_cache/2312.04521/extract

Windows 有同样的问题,这个函数不太完善

# 运行时变量值
# PATH_PRIVATE_UPLOAD = 'private_upload'
# PATH_LOGGING = 'gpt_log'
# path_or_url = 'C:\\Users\\xxx/arxiv_cache/2309.06180\\extract'

# 这个 if 命中最后一个 else
    if path_or_url.startswith(PATH_LOGGING):    # 日志文件(按用户划分)
        sensitive_path = PATH_LOGGING
    elif path_or_url.startswith(PATH_PRIVATE_UPLOAD):   # 用户的上传目录(按用户划分)
        sensitive_path = PATH_PRIVATE_UPLOAD
    elif path_or_url.startswith('tests'):   # 一个常用的测试目录
        return True
    else:
        raise FriendlyException(f"输入文件的路径 ({path_or_url}) 存在,但位置非法。请将文件上传后再执行该任务。") # return False

临时解法是在这个函数最前面加一行return True就行了

感谢 已解决

image
windows项目路径应该如何输入,提示路径非法。

理解了,本地文件项目要打包成压缩文件.zip/.tar格式才可以

现在3.8.2还是这样