Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[求助] 读取数据文件失败 #146

Open
4 tasks done
dan3577 opened this issue Nov 14, 2023 · 12 comments
Open
4 tasks done

[求助] 读取数据文件失败 #146

dan3577 opened this issue Nov 14, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@dan3577
Copy link

dan3577 commented Nov 14, 2023

Verify Steps

  • Tracker 我已经在 Issue Tracker 中找过我要提出的问题
  • Latest 我已经使用最新版本测试过,问题依旧存在
  • Code 这是 MIUITask 自身代码存在的问题,并非我所使用的 网络 或 设备 等特定问题
  • Meaningful 我提交的不是无意义的 催促更新或修复 请求

MIUITask Version

v1.7.0

Bug Found in Environment

Linux

Bug Found in Python Version

3.12

Describe the Bug

2023-11-14 08:57:48.957 | ERROR | utils.config:load_config:131 - 读取数据文件失败,请检查数据文件 /ql/data/scripts/asmrlt2_miui-auto-tasks_master/data/config.yaml 格式是否正确

config.yaml格式复制wiki提供的数据,仅修改ID和password内容,,config.yaml权限777了

MIUITask Log

2023-11-14 09:03:22.659 | ERROR | utils.config:load_config:131 - 读取数据文件失败,请检查数据文件 /ql/data/scripts/asmrlt2_miui-auto-tasks_master/data/config.yaml 格式是否正确
Traceback (most recent call last):

File "/ql/data/scripts/asmrlt2_miui-auto-tasks_master/miuitask.py", line 8, in
from utils.api.login import Login

File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed

File "/ql/data/scripts/asmrlt2_miui-auto-tasks_master/utils/api/login.py", line 10, in
from ..config import Account, write_plugin_data

File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed

File "/ql/data/scripts/asmrlt2_miui-auto-tasks_master/utils/config.py", line 148, in
ConfigManager.load_config()
│ └ <classmethod(<function ConfigManager.load_config at 0x7fb50140fb50>)>
└ <class 'utils.config.ConfigManager'>

File "/ql/data/scripts/asmrlt2_miui-auto-tasks_master/utils/config.py", line 126, in load_config
new_model = Config.model_validate(data)
│ │ └ {'accounts': [{'uid': 127xxxxxxx, 'password': 'xxxxxxxxx', 'user-agent': 'Mozilla/5.0 (Android 11; Mobile; rv:95.0) Gecko/95...
│ └ <classmethod(<function BaseModel.model_validate at 0x7fb501cd7640>)>
└ <class 'utils.config.Config'>

File "/usr/local/lib/python3.10/site-packages/pydantic/main.py", line 503, in model_validate
return cls.pydantic_validator.validate_python(
│ │ └ <method 'validate_python' of 'pydantic_core._pydantic_core.SchemaValidator' objects>
│ └ SchemaValidator(title="Config", validator=Model(
│ ModelValidator {
│ revalidate: Never,
│ validator: ModelFiel...
└ <class 'utils.config.Config'>

pydantic_core._pydantic_core.ValidationError: 1 validation error for Config
accounts.0.uid
Input should be a valid string [type=string_type, input_value=127xxxxxxx, input_type=int]
For further information visit https://errors.pydantic.dev/2.4/v/string_type
Traceback (most recent call last):
File "/ql/data/scripts/asmrlt2_miui-auto-tasks_master/miuitask.py", line 8, in
from utils.api.login import Login
File "/ql/data/scripts/asmrlt2_miui-auto-tasks_master/utils/api/login.py", line 10, in
from ..config import Account, write_plugin_data
File "/ql/data/scripts/asmrlt2_miui-auto-tasks_master/utils/config.py", line 148, in
ConfigManager.load_config()
File "/ql/data/scripts/asmrlt2_miui-auto-tasks_master/utils/config.py", line 126, in load_config
new_model = Config.model_validate(data)
File "/usr/local/lib/python3.10/site-packages/pydantic/main.py", line 503, in model_validate
return cls.pydantic_validator.validate_python(
pydantic_core._pydantic_core.ValidationError: 1 validation error for Config
accounts.0.uid
Input should be a valid string [type=string_type, input_value=127xxxxxxx, input_type=int]
For further information visit https://errors.pydantic.dev/2.4/v/string_type

执行结束... 2023-11-14 09:03:22 耗时 1 秒     

MIUITask Config

accounts:
  - uid: 127xxxxxx
    password: xxxxxxxx
    user-agent: 'Mozilla/5.0 (Android 11; Mobile; rv:95.0) Gecko/95.0 Firefox/95.0'
    check-in: true
    browse-user-page: true
    browse-post: true
    thumb-up: false
    browse-specialpage: true
    board-follow: false
    carrot-pull: true
logging: true
version: v1.7.0

Screenshots

image

@dan3577 dan3577 added the bug Something isn't working label Nov 14, 2023
@Night-stars-1
Copy link
Collaborator

wiki内容过时,请删除config运行一次程序,自动生成

@0-8-4
Copy link
Owner

0-8-4 commented Nov 14, 2023 via email

@Tianqiwangdie
Copy link

请问青龙面板订阅管理中,拉取脚本,但在脚本管理当中并没有config.yaml文件,我需要怎么做
image

@Night-stars-1
Copy link
Collaborator

请问青龙面板订阅管理中,拉取脚本,但在脚本管理当中并没有config.yaml文件,我需要怎么做 image

运行一次

@Tianqiwangdie
Copy link

请问青龙面板订阅管理中,拉取脚本,但在脚本管理当中并没有config.yaml文件,我需要怎么做 image

运行一次

image
image
这是我的运行日志和依赖,麻烦请问我该如何操作

@for7GG
Copy link

for7GG commented Nov 14, 2023

请问青龙面板订阅管理中,拉取脚本,但在脚本管理当中并没有config.yaml文件,我需要怎么做 image

运行一次

image image 这是我的运行日志和依赖,麻烦请问我该如何操作

按照提示安装依赖
q

@Night-stars-1
Copy link
Collaborator

image image 这是我的运行日志和依赖,麻烦请问我该如何操作

onepush
loguru>=0.7.2
pydantic>=2.4.2
httpx>=0.25.1
crypto==1.4.1
pyyaml>=6.0.1
tenacity>=8.2.3

依赖库

@Karen-lai
Copy link

我也遇到了该问题

@Karen-lai
Copy link

删除青龙面板原订阅并删除文件,重新订阅后出现同样的问题,没有yaml,运行和图片输出错误提示相同。

@PianCat
Copy link
Contributor

PianCat commented Nov 14, 2023

删除青龙面板原订阅并删除文件,重新订阅后出现同样的问题,没有yaml,运行和图片输出错误提示相同。

可以截个图看看吗

@Karen-lai
Copy link

螢幕截圖 2023-11-14 下午8 05 02

删除青龙面板原订阅并删除文件,重新订阅后出现同样的问题,没有yaml,运行和图片输出错误提示相同。

可以截个图看看吗

@Karen-lai
Copy link

经过与上一个版本对比,更新后青龙面板添加订阅缺少部分文件,比如config.yaml,经过下载添加替换后即可正常运行。但是依然无法通过签到人机验证。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants