stephanlensky / hyacinth

A Discord bot to send notifications for marketplace (Craigslist, Facebook) postings based on complex matching rules.
https://slensky.com/hyacinth
GNU Affero General Public License v3.0
45 stars 8 forks source link

Improper Token has been passed #83

Closed JrVega03 closed 3 months ago

JrVega03 commented 3 months ago

I regenerated my discord token many times and I still receive the same error. I doubled checked and I have replaced the values inside <>, Any advice?

Attaching to service-1
service-1  | 2024-06-06 11:22:20 [9] [INFO] hyacinth.discord.discord_bot Initializing bot...
service-1  | 2024-06-06 11:22:20 [9] [Attaching to service-1
service-1  | 2024-06-06 11:22:20 [9] [INFO] hyacinth.discord.discord_bot Initializing bot...
service-1  | 2024-06-06 11:22:20 [9] [INFO] hyacinth.util.geo Loading geospatial datasets...
service-1  | 2024-06-06 11:22:26 [9] [INFO] hyacinth.util.geo Creating indexes...
service-1  | 2024-06-06 11:22:27 [9] [INFO] hyacinth.util.geo Done!
service-1  | Traceback (most recent call last):
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/http.py", line 803, in static_login
service-1  |     data = await self.request(Route('GET', '/users/@me'))
service-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/http.py", line 745, in request
service-1  |     raise HTTPException(response, data)
service-1  | discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized
service-1  |
service-1  | The above exception was the direct cause of the following exception:
service-1  |
service-1  | Traceback (most recent call last):
service-1  |   File "<string>", line 1, in <module>
service-1  |   File "/app/hyacinth/_entry.py", line 9, in run_discord_bot
service-1  |     asyncio.run(discord_bot.start())
service-1  |   File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
service-1  |     return runner.run(main)
service-1  |            ^^^^^^^^^^^^^^^^
service-1  |   File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
service-1  |     return self._loop.run_until_complete(task)
service-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
service-1  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
service-1  |     return future.result()
service-1  |            ^^^^^^^^^^^^^^^
service-1  |   File "/app/hyacinth/discord/discord_bot.py", line 253, in start
service-1  |     await client.start(settings.discord_token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/client.py", line 777, in start
service-1  |     await self.login(token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/client.py", line 612, in login
service-1  |     data = await self.http.static_login(token)
service-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/http.py", line 807, in static_login
service-1  |     raise LoginFailure('Improper token has been passed.') from exc
service-1  | discord.errors.LoginFailure: Improper token has been passed.
service-1  | Unclosed connector
service-1  | connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fd2f3403d70>, 6678.866989853)]']
service-1  | connector: <aiohttp.connector.TCPConnector object at 0x7fd2f34229f0>
service-1  | source_traceback: Object created at (most recent call last):
service-1  |   File "<string>", line 1, in <module>
service-1  |   File "/app/hyacinth/_entry.py", line 9, in run_discord_bot
service-1  |     asyncio.run(discord_bot.start())
service-1  |   File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
service-1  |     return runner.run(main)
service-1  |   File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
service-1  |     return self._loop.run_until_complete(task)
service-1  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete
service-1  |     self.run_forever()
service-1  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever
service-1  |     self._run_once()
service-1  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1985, in _run_once
service-1  |     handle._run()
service-1  |   File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
service-1  |     self._context.run(self._callback, *self._args)
service-1  |   File "/app/hyacinth/discord/discord_bot.py", line 253, in start
service-1  |     await client.start(settings.discord_token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/client.py", line 777, in start
service-1  |     await self.login(token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/client.py", line 612, in login
service-1  |     data = await self.http.static_login(token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/http.py", line 789, in static_login
service-1  |     self.connector = aiohttp.TCPConnector(limit=0, family=socket.AF_INET)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 776, in __init__
service-1  |     super().__init__(
service-1  | error: Recipe `run` failed on line 37 with exit code 1
service-1 exited with code 1INFO] hyacinth.util.geo Loading geospatial datasets...
service-1  | 2024-06-06 11:22:26 [9] [INFO] hyacinth.util.geo Creating indexes...
service-1  | 2024-06-06 11:22:27 [9] [INFO] hyacinth.util.geo Done!
service-1  | Traceback (most recent call last):
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/http.py", line 803, in static_login
service-1  |     data = await self.request(Route('GET', '/users/@me'))
service-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/http.py", line 745, in request
service-1  |     raise HTTPException(response, data)
service-1  | discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized
service-1  |
service-1  | The above exception was the direct cause of the following exception:
service-1  |
service-1  | Traceback (most recent call last):
service-1  |   File "<string>", line 1, in <module>
service-1  |   File "/app/hyacinth/_entry.py", line 9, in run_discord_bot
service-1  |     asyncio.run(discord_bot.start())
service-1  |   File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
service-1  |     return runner.run(main)
service-1  |            ^^^^^^^^^^^^^^^^
service-1  |   File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
service-1  |     return self._loop.run_until_complete(task)
service-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
service-1  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
service-1  |     return future.result()
service-1  |            ^^^^^^^^^^^^^^^
service-1  |   File "/app/hyacinth/discord/discord_bot.py", line 253, in start
service-1  |     await client.start(settings.discord_token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/client.py", line 777, in start
service-1  |     await self.login(token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/client.py", line 612, in login
service-1  |     data = await self.http.static_login(token)
service-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/http.py", line 807, in static_login
service-1  |     raise LoginFailure('Improper token has been passed.') from exc
service-1  | discord.errors.LoginFailure: Improper token has been passed.
service-1  | Unclosed connector
service-1  | connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fd2f3403d70>, 6678.866989853)]']
service-1  | connector: <aiohttp.connector.TCPConnector object at 0x7fd2f34229f0>
service-1  | source_traceback: Object created at (most recent call last):
service-1  |   File "<string>", line 1, in <module>
service-1  |   File "/app/hyacinth/_entry.py", line 9, in run_discord_bot
service-1  |     asyncio.run(discord_bot.start())
service-1  |   File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
service-1  |     return runner.run(main)
service-1  |   File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
service-1  |     return self._loop.run_until_complete(task)
service-1  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete
service-1  |     self.run_forever()
service-1  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever
service-1  |     self._run_once()
service-1  |   File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1985, in _run_once
service-1  |     handle._run()
service-1  |   File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
service-1  |     self._context.run(self._callback, *self._args)
service-1  |   File "/app/hyacinth/discord/discord_bot.py", line 253, in start
service-1  |     await client.start(settings.discord_token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/client.py", line 777, in start
service-1  |     await self.login(token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/client.py", line 612, in login
service-1  |     data = await self.http.static_login(token)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/discord/http.py", line 789, in static_login
service-1  |     self.connector = aiohttp.TCPConnector(limit=0, family=socket.AF_INET)
service-1  |   File "/home/joyvan/.cache/pypoetry/virtualenvs/hyacinth-9TtSrW0h-py3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 776, in __init__
service-1  |     super().__init__(
service-1  | error: Recipe `run` failed on line 37 with exit code 1
service-1 exited with code 1
JrVega03 commented 3 months ago

Just found my issue I had to remove "<>" itself!