运行python3 main.py出现错误
运行python3 main.py后出现以下错误
root@debian-s-1vcpu-512mb-10gb-sgp1-01:~/ProxyURL# python3 main.py
Traceback (most recent call last):
File "/root/ProxyURL/main.py", line 7, in
thankyou
The same question happened. So how could I solve it?
虽然跑起来了,但是PotPlayer播放不了,APTV可以,但是我还想喜欢PotPlayer对电视插帧,所以没有深入研究,打算放弃这个项目,报错解决方法如下: 新版本BaseSettings换到pydantic-settings包里面去了,所以报错, 包安装 python3 -m pip install pydantic-settings
config.py加入 from pydantic_settings import BaseSettings
替换这几行 VERSION: ClassVar[str] = '1.0' # 使用 ClassVar
ORIGINS: List[str] = ['*'] # 添加类型注解
ROOT: Path = Path('.') # 添加类型注解
LOG_DIR: Path = Path('log') # 添加类型注解
datadir: Path = Path('vtemp') # 添加类型注解
count: int = 0 # 添加类型注解
url_regex: str = r"(http|https)://((?:[\w-]+.)+[a-z0-9]+)((?:/[^/?#]*)+)?(?[^#]+)?(#.+)?"