• Как решить ошибку PermissionError: [Errno 13] Permission denied: '/proc/stat' !?

    @flessska Автор вопроса
    Yupiter7575, хорошо , попробую , спасибо .
  • Как решить ошибку PermissionError: [Errno 13] Permission denied: '/proc/stat' !?

    @flessska Автор вопроса
    Yupiter7575, да , я закрыл полностью всё , очистил . Зашёл в терминал , запустил бота , и выдаёт ошибку .
  • Как решить ошибку PermissionError: [Errno 13] Permission denied: '/proc/stat' !?

    @flessska Автор вопроса
    Закрыл , запустил , выдало следующее :

    ERROR:asyncio:Task exception was never retrieved
    future: exception=PermissionError(13, 'Permission denied')>
    Traceback (most recent call last):
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/psutil/_common.py", line 403, in wrapper
    return cache[key]
    KeyError: (('/proc',), frozenset())

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 388, in _process_polling_updates
    for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 225, in process_updates
    return await asyncio.gather(*tasks)
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/aiogram/dispatcher/handler.py", line 117, in notify
    response = await handler_obj.handler(*args, **partial_data)
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 273, in process_update
    return await self.callback_query_handlers.notify(update.callback_query)
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/aiogram/dispatcher/handler.py", line 117, in notify
    response = await handler_obj.handler(*args, **partial_data)
    File "/storage/emulated/0/Download/bot2/main.py", line 314, in handler_call
    await bot.send_message(chat_id=chat_id, text=SystemInfo.get_info_text(), parse_mode='html')
    File "/storage/emulated/0/Download/bot2/SystemInfo.py", line 17, in get_info_text
    cpu = psutil.cpu_percent(interval=1)
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/psutil/__init__.py", line 1738, in cpu_percent
    t1 = cpu_times()
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/psutil/__init__.py", line 1607, in cpu_times
    return _psplatform.cpu_times()
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/psutil/_pslinux.py", line 602, in cpu_times
    set_scputimes_ntuple(procfs_path)
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/psutil/_common.py", line 405, in wrapper
    ret = cache[key] = fun(*args, **kwargs)
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/psutil/_pslinux.py", line 269, in set_scputimes_ntuple
    with open_binary('%s/stat' % procfs_path) as f:
    File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/psutil/_common.py", line 711, in open_binary
    return open(fname, "rb", **kwargs)
    PermissionError: [Errno 13] Permission denied: '/proc/stat'