Gafarchik
@Gafarchik
Молодой и зеленый програмист

Discord.py перестал работать?

Доброго времени суток!Сегодня с утра запустил бота и тут меня python решил поприветствовать:
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<Client.start() done, defined at C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py:568> exception=LoginFailure('Improper token has been passed.')>
Traceback (most recent call last):
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\http.py", line 261, in static_login
    data = await self.request(Route('GET', '/users/@me'))
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\http.py", line 225, in request
    raise HTTPException(r, data)
discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py", line 584, in start
    await self.login(*args, bot=bot)
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py", line 442, in login
    await self.http.static_login(token.strip(), bot=bot)
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\http.py", line 265, in static_login
    raise LoginFailure('Improper token has been passed.') from exc
discord.errors.LoginFailure: Improper token has been passed.
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<Client.start() done, defined at C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py:568> exception=LoginFailure('Improper token has been passed.')>
Traceback (most recent call last):
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\http.py", line 261, in static_login
    data = await self.request(Route('GET', '/users/@me'))
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\http.py", line 225, in request
    raise HTTPException(r, data)
discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py", line 584, in start
    await self.login(*args, bot=bot)
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py", line 442, in login
    await self.http.static_login(token.strip(), bot=bot)
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\http.py", line 265, in static_login
    raise LoginFailure('Improper token has been passed.') from exc
discord.errors.LoginFailure: Improper token has been passed.
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<Client.start() done, defined at C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py:568> exception=LoginFailure('Improper token has been passed.')>
Traceback (most recent call last):
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\http.py", line 261, in static_login
    data = await self.request(Route('GET', '/users/@me'))
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\http.py", line 225, in request
    raise HTTPException(r, data)
discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py", line 584, in start
    await self.login(*args, bot=bot)
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py", line 442, in login
    await self.http.static_login(token.strip(), bot=bot)
  File "C:\Users\gafig.DESKTOP-B4N254S\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\http.py", line 265, in static_login
    raise LoginFailure('Improper token has been passed.') from exc
discord.errors.LoginFailure: Improper token has been passed.

мне было ОЧЕНЬ приятно от такого.Как теперь это решить?
import discord
from discord import utils
from discord import client
import config
from discord.ext import commands
from discord.ext.commands import Bot
from discord.utils import get
from threading import Thread
import random
import io
import asyncio
import requests
import time

это все библиотеки которые юзал. python у меня 3.8.2 до 3.8.3 не обновлял.Что это за ошибка такая и что ее спровоцировало?
  • Вопрос задан
  • 738 просмотров
Решения вопроса 1
inoise
@inoise
Solution Architect, AWS Certified, Serverless
Токен сдох. Надо другой получить
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
@bacon
Быстрее было ошибку в гугле траслайте перевести, чем создавать этот пост.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы