I want to install this script( https://github.com/SpEcHiDe/AnyDLBot)
on my server, but I was surprised that I cannot run any Python script and this error message appears to me every time I run the Python script :
(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'
For your information, I changed versions of Python, but I faced the same problem ☹️☹️☹️☹️☹️☹️
Related
An error ocurred while starting the kernel
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 287, in main
import_spydercustomize()
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 39, in import_spydercustomize
import spydercustomize
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 27, in
from IPython.core.getipython import get_ipython
File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython_init.py", line 54, in
from .core.application import Application
File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython\core\application.py", line 23, in
from traitlets.config.application import Application, catch_config_error
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config_init_.py", line 6, in
from .application import *
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 19, in
from traitlets.config.configurable import Configurable, SingletonConfigurable
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 12, in
from .loader import Config, LazyConfigValue, _is_section_key
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config\loader.py", line 16, in
from ipython_genutils.path import filefind
File "C:\ProgramData\Anaconda3\lib\site‑packages\ipython_genutils\path.py", line 13, in
import random
File "C:\Users\VelammalM29\random.py", line 5, in
l1=eval(input("enter a list:"))
EOFError: EOF when reading a line
I am trying to decompile a file but I have run into an error.
C:\Users\Owner>decompyle3 wvripper.pyc
Traceback (most recent call last):
File "c:\users\owner\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\owner\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Owner\AppData\Local\Programs\Python\Python38\Scripts\decompyle3.exe\__main__.py", line 4, in <module>
File "c:\users\owner\appdata\local\programs\python\python38\lib\site-packages\decompyle3\__init__.py", line 48, in <module>
import decompyle3.semantics.pysource
File "c:\users\owner\appdata\local\programs\python\python38\lib\site-packages\decompyle3\semantics\pysource.py", line 139, in <module>
import decompyle3.parsers.main as python_parser
File "c:\users\owner\appdata\local\programs\python\python38\lib\site-packages\decompyle3\parsers\__init__.py", line 12, in <module>
from decompyle3.parsers.main import *
File "c:\users\owner\appdata\local\programs\python\python38\lib\site-packages\decompyle3\parsers\main.py", line 32, in <module>
from xdis import iscode, py_str2float
ImportError: cannot import name 'py_str2float' from 'xdis' (c:\users\owner\appdata\local\programs\python\python38\lib\site-packages\xdis\__init__.py)
Apparently, I cannot import a file. What should I do?
I believe py_str2float needs to be imported from xdis.magics as in this example: https://github.com/welchbj/formatic/blob/524aed11c33627eba51cff169d8210f01660a250/formatic/walkers/code_object_injection_walker.py#L12-L13
Please I am getting this error after installing brownie using pipx. I tried running "brownie --version" and I got the error below. can someone assist in resolving this pls? The python version on my system is upto date but I observed when I installed brownie, it showed an old version.
C:\Users\OGIDAN TOLU>brownie --version
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\users\ogidan tolu\.local\bin\brownie.exe\__main__.py", line 4, in <module>
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 41, in <module>
from brownie.network import web3
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\__init__.py", line 4, in <module>
from .account import Accounts
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\account.py", line 29, in <module>
from .gas.bases import GasABC
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\gas\bases.py", line 7, in <module>
from brownie.network.web3 import web3
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 208, in <module>
web3 = Web3()
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 30, in __init__
self.enable_unstable_package_management_api()
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\web3\main.py", line 289, in enable_unstable_package_management_api
from web3.pm import PM # noqa: F811
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\web3\pm.py", line 36, in <module>
from ethpm import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\__init__.py", line 8, in <module>
from .package import Package # noqa: F401
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\package.py", line 60, in <module>
from ethpm.uri import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\uri.py", line 15, in <module>
from ethpm._utils.backend import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\_utils\backend.py", line 13, in <module>
from ipfshttpclient.exceptions import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\__init__.py", line 11, in <module>
from .client import DEFAULT_ADDR, DEFAULT_BASE
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\client\__init__.py", line 21, in <module>
from . import bitswap
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\client\bitswap.py", line 3, in <module>
from . import base
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\client\base.py", line 274, in <module>
def returns_no_item(func: _inner_func_t[ty.NoReturn]) -> _returns_single_wrapper_t:
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 251, in inner
return func(*args, **kwds)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 824, in __class_getitem__
params = tuple(_type_check(p, msg) for p in params)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 824, in <genexpr>
params = tuple(_type_check(p, msg) for p in params)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 135, in _type_check
raise TypeError(f"Plain {arg} is not valid as type argument")
TypeError: Plain typing.NoReturn is not valid as type argument
I can't use the pip command but python is installed properly.
Traceback (most recent call last):
File "c:\users\personal\appdata\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\personal\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\PERSONAL\AppData\Local\Programs\Python\Python38-32\Scripts\pip3.exe\__main__.py", line 5, in <module>
File "c:\users\personal\appdata\local\programs\python\python38-32\lib\site-packages\pip\_internal\__init__.py", line 19, in <module>
from pip._vendor.urllib3.exceptions import DependencyWarning
File "c:\users\personal\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\urllib3\__init__.py", line 7, in <module>
from .connectionpool import (
File "c:\users\personal\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 30, in <module>
from .connection import (
File "c:\users\personal\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\urllib3\connection.py", line 39, in <module>
from .util.ssl_ import (
ValueError: source code string cannot contain null bytes```
I am calling a python script from another python script,irrespective of the output the python script I am calling I get the following error in stderr,I googled but couldn't find anything concrete,am clueless as to why am getting this error?does anyone have any idea on how to fix it?
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 151, in _run_module_as_main
mod_name, loader, code, fname = _get_module_details(mod_name)
File "C:\Python27\lib\runpy.py", line 109, in _get_module_details
return _get_module_details(pkg_main_name)
File "C:\Python27\lib\runpy.py", line 101, in _get_module_details
loader = get_loader(mod_name)
File "C:\Python27\lib\pkgutil.py", line 464, in get_loader
return find_loader(fullname)
File "C:\Python27\lib\pkgutil.py", line 474, in find_loader
for importer in iter_importers(fullname):
File "C:\Python27\lib\pkgutil.py", line 430, in iter_importers
__import__(pkg)
File "C:\Python27\lib\site-packages\pip\__init__.py", line 14, in <module>
from pip.utils import get_installed_distributions, get_prog
File "C:\Python27\lib\site-packages\pip\utils\__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "C:\Python27\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 35,
import email.parser
File "C:\Python27\lib\email\parser.py", line 12, in <module>
from email.feedparser import FeedParser
File "C:\Python27\lib\email\feedparser.py", line 27, in <module>
from email import message
File "C:\Python27\lib\email\message.py", line 16, in <module>
import email.charset
File "C:\Python27\lib\email\charset.py", line 13, in <module>
import email.base64mime
File "C:\Python27\lib\email\base64mime.py", line 40, in <module>
from email.utils import fix_eols
File "C:\Python27\lib\email\utils.py", line 27, in <module>
import random
File "C:\Python27\lib\random.py", line 49, in <module>
import hashlib as _hashlib
File "C:\Python27\lib\hashlib.py", line 138, in <module>
_hashlib.openssl_md_meth_names)
AttributeError: 'module' object has no attribute 'openssl_md_meth_names'
Try to run brew cleanup and after that brew postinstall python.
For more info see this thread