我能';不要在Ubuntu中运行python脚本
我想安装此脚本() 在我的服务器上,但令我惊讶的是,我无法运行任何Python脚本,并且每次运行Python脚本时都会出现以下错误消息:我能';不要在Ubuntu中运行python脚本,python,python-3.x,Python,Python 3.x,我想安装此脚本() 在我的服务器上,但令我惊讶的是,我无法运行任何Python脚本,并且每次运行Python脚本时都会出现以下错误消息: (VENV) root@Hermania:/datadrive/AnyDLBot# python3 -m anydlbot Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_mod
(VENV) root@Hermania:/datadrive/AnyDLBot# python3 -m anydlbot Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/datadrive/AnyDLBot/anydlbot/__main__.py", line 8, in <module>
from pyrogram import Client
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/__init__.py", line 23, in <module>
from .client import *
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/__init__.py", line 19, in <module>
from .client import Client
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/client.py", line 40, in <module>
from pyrogram.client.methods.password.utils import compute_check
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/methods/__init__.py", line 19, in <module>
from .bots import Bots
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/methods/bots/__init__.py", line 19, in <module>
from .answer_callback_query import AnswerCallbackQuery
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/methods/bots/answer_callback_query.py", line 20, in <module>
from pyrogram.client.ext import BaseClient
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/ext/__init__.py", line 19, in <module>
from .base_client import BaseClient
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/ext/base_client.py", line 28, in <module>
from ..parser import Parser
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/__init__.py", line 19, in <module>
from .parser import Parser
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/parser.py", line 23, in <module>
from .html import HTML
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/html.py", line 109, in <module>
class HTML:
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/html.py", line 110, in HTML
def __init__(self, client: Union["pyrogram.BaseClient", None]):
File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
dict(self.__dict__), parameters, _root=True)
File "/usr/lib/python3.5/typing.py", line 512, in __new__
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 190, in __subclasscheck__
self._eval_type(globalns, localns)
File "/usr/lib/python3.5/typing.py", line 177, in _eval_type
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
AttributeError: module 'pyrogram' has no attribute 'BaseClient'
(VENV)root@Hermania:/datadrive/AnyDLBot#python3-m AnyDLBot回溯(最后一次调用):
文件“/usr/lib/python3.5/runpy.py”,第184行,在运行模块中作为主模块
“\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
文件“/usr/lib/python3.5/runpy.py”,第85行,在运行代码中
exec(代码、运行\全局)
文件“/datadrive/AnyDLBot/AnyDLBot/\uuuuu main\uuuuuuuu.py”,第8行,在
从焦图导入客户端
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/___init__.py”,第23行,在
从客户端导入*
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/_init__.py”,第19行,在
从.client导入客户端
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/client.py”,第40行,在
从pyrogram.client.methods.password.utils导入计算检查
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/methods/__init__.py”,第19行,在
从.bots导入bots
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/methods/bots/__init__.py”,第19行,在
from.answer\u callback\u query导入AnswerCallbackQuery
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/methods/bots/answer\u callback\u query.py”,第20行,在
从pyrogram.client.ext导入BaseClient
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/ext/_-init__.py”,第19行,in
从.base\u客户端导入BaseClient
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/ext/base_client.py”,第28行,在
从..解析器导入解析器
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/parser/__init__.py”,第19行,在
from.parser导入解析器
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/parser/parser.py”,第23行,在
从.html导入html
文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/parser/html.py”,第109行,在
类HTML:
html格式的文件“/datadrive/AnyDLBot/VENV/lib/python3.5/site packages/pyrogram/client/parser/html.py”,第110行
定义初始化(self,客户机:Union[“pyrogram.BaseClient”,无]:
文件“/usr/lib/python3.5/typing.py”,第552行,在__
dict(self.\u dict\u),参数,\u root=True)
文件“/usr/lib/python3.5/typing.py”,第512行,新__
对于所有参数中的t2-{t1}如果不存在(t2,TypeVar)):
文件“/usr/lib/python3.5/typing.py”,第512行,在
对于所有参数中的t2-{t1}如果不存在(t2,TypeVar)):
文件“/usr/lib/python3.5/typing.py”,第190行,在子检查中__
自我评估类型(全局、局部)
文件“/usr/lib/python3.5/typing.py”,第177行,格式为
评估(自我、转发、代码、全局、本地),
文件“”,第1行,在
AttributeError:模块“pyrogram”没有属性“BaseClient”
供您参考,我更改了Python的版本,但遇到了同样的问题☹️☹️☹️☹️☹️☹️ 一般来说,调试别人的软件不在我们的范围之内。如果您想自己解决这个问题,请加载一个调试器,在引用
Union[“pyrogram.BaseClient”,None]
的行上放置一个断点,然后进行检查。不要指望这里的人会为你这样做;如果你想要一个我们将在这里回答的问题,你需要构建一个独立的程序来复制bug背后的特定错误,并将其包含在问题本身中。最好在AnyDLBot
的bug跟踪器中提交一份记录单。通常,这种错误指向本地安装的问题。在这种情况下,我敢打赌您安装的pyrogram
版本与用于编写此AnyDLBot
脚本的版本不同。一般来说,调试其他人的软件不在我们的范围之内。如果您想自己解决这个问题,请加载一个调试器,在引用Union[“pyrogram.BaseClient”,None]
的行上放置一个断点,然后进行检查。不要指望这里的人会为你这样做;如果你想要一个我们将在这里回答的问题,你需要构建一个独立的程序来复制bug背后的特定错误,并将其包含在问题本身中。最好在AnyDLBot
的bug跟踪器中提交一份记录单。通常,这种错误指向本地安装的问题。在这种情况下,我敢打赌您安装的pyrogram
版本与用于编写此AnyDLBot
脚本的版本不同。