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

【已解决】python的flask项目无法创建

发表在 Linux面板2021-12-14 21:07 [复制链接] 3 1949

报错信息:感觉不是代码问题
Traceback (mostrecent 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 enteredthe URL manually please check your spelling and try again.

During handlingof the above exception, another exception occurred:

Traceback (mostrecent 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, indecode
(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 handlingof the above exception, another exception occurred:

Traceback (mostrecent 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, indecode
(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 handlingof the above exception, another exception occurred:

Traceback (mostrecent call last):
File"class/panelPlugin.py", line 1965, in a
returneval(execStr)
File"", line 1, in
File"plugin/pythonmamager/pythonmamager_main.py", line 266, inCreateProject
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
returnReadFile(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-12-14 21:33:17 | 显示全部楼层
您好,提示错误是你编码问题,你是不是有设置中文?

使用道具 举报 回复 支持 反对
发表于 2021-12-14 21:53:56 | 显示全部楼层
谢花郎 发表于 2021-12-14 21:33
您好,提示错误是你编码问题,你是不是有设置中文?

已经设置编码为utf-8
使用道具 举报 回复 支持 反对
发表于 2021-12-14 22:03:30 | 显示全部楼层
问题已解决
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

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

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

紧急运维服务

响应时间:3分钟

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

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

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

点击联系技术免费分析

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

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