amtoaer / bili-sync

由 Rust & Tokio 驱动的哔哩哔哩同步工具
https://bili-sync.allwens.work
MIT License
537 stars 42 forks source link

群晖docker运行后一直处于重启状态 #14

Closed Barry2012 closed 5 months ago

Barry2012 commented 9 months ago

config.json配置正确,并确放到了config文件夹下了,权限也给了,但是不知道为何群晖docker运行后一直处于重启状态,部分日志如下,最后一句是载入配置文件失败,试了很多次,还是不行。 Traceback (most recent call last): File "/app/settings.py", line 46, in load return Config.schema().loads(f.read()) ^^^^^^^^ File "", line 322, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 819: invalid continuation byte The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/app/entry.py", line 7, in from commands import ( File "/app/commands.py", line 9, in from models import FavoriteItem File "/app/models.py", line 15, in from settings import settings File "/app/settings.py", line 76, in settings = init_settings() ^^^^^^^^^^^^^^^ File "/app/settings.py", line 67, in init_settings Config.load(DEFAULT_CONFIG_PATH) File "/app/settings.py", line 48, in load raise RuntimeError(f"Failed to load config file: {path}") from e RuntimeError: Failed to load config file: /app/config/config.json Traceback (most recent call last): File "/app/settings.py", line 46, in load return Config.schema().loads(f.read()) ^^^^^^^^ File "", line 322, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 819: invalid continuation byte The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/app/entry.py", line 7, in from commands import ( File "/app/commands.py", line 9, in from models import FavoriteItem File "/app/models.py", line 15, in from settings import settings File "/app/settings.py", line 76, in settings = init_settings() ^^^^^^^^^^^^^^^ File "/app/settings.py", line 67, in init_settings Config.load(DEFAULT_CONFIG_PATH) File "/app/settings.py", line 48, in load raise RuntimeError(f"Failed to load config file: {path}") from e RuntimeError: Failed to load config file: /app/config/config.json

amtoaer commented 9 months ago

这个报错是配置文件用 utf-8 编码没有正常解析。 可以确认一下配置文件的内容是否使用了 utf-8 外的编码,或者包含一些无效字符。

Barry2012 commented 9 months ago

已解决,应该就是编码格式问题, 除此以外还想问下,font_type支撑哪些英文字体,改成英文名称之后是不是就避免了编码错误了

jianzhichu commented 7 months ago

我的运行起来,没日志。。。直接退出