Answer the question
In order to leave comments, you need to log in
Discord.py stopped working?
Good day! This morning I launched the bot and then python decided to greet me:
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
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question