当前位置:论坛首页 > Linux面板 > 求助

【已解决】python项目管理无法安装依赖模块

发表在 Linux面板2021-10-29 00:26 [复制链接] 2 2325

python项目管理 只要勾选安装模块依赖 就会报错  ,不勾选就没问题从新安装了pyenv 选择了版本也还是报错  具体报错信息如下


抱歉,出错了:
Traceback (most recent call last):
File "class/flask_sockets.py", line 30, in __call__
handler, values = adapter.match()
File "/www/server/panel/pyenv/lib/python3.7/site-packages/werkzeug/routing.py", line 1945, in match
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "class/public.py", line 293, in ReadFile
f_body = fp.read()
File "/www/server/panel/pyenv/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "class/public.py", line 299, in ReadFile
f_body = fp.read()
File "/www/server/panel/pyenv/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "class/panelPlugin.py", line 1965, in a
return eval(execStr)
File "", line 1, in
File "plugin/pythonmamager/pythonmamager_main.py", line 266, in CreateProject
requirements = self.__install_module(values["install_module"],values["path"],vpath)
File "plugin/pythonmamager/pythonmamager_main.py", line 100, in __install_module
requirementsconf = public.readFile(requirements).splitlines()
File "class/public.py", line 317, in readFile
return ReadFile(filename,mode)
File "class/public.py", line 303, in ReadFile
f_body = fp.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xff in position 0: illegal multibyte sequence


使用道具 举报 只看该作者 回复
发表于 2021-10-29 09:33:40 | 显示全部楼层
您好,您可检查一下你requirements.txt文件编码是否UTF-8编码,如果编码不对,导入就会提示编码问题错误
使用道具 举报 回复 支持 1 反对 0
发表于 2021-10-29 12:09:45 | 显示全部楼层
谢花郎 发表于 2021-10-29 09:33
您好,您可检查一下你requirements.txt文件编码是否UTF-8编码,如果编码不对,导入就会提示编码问题错误 ...

好的   解决了  感谢帮助
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表