Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback errors on bot.py run. Assistance? #13

Open
neralen opened this issue Jan 15, 2025 · 3 comments
Open

Callback errors on bot.py run. Assistance? #13

neralen opened this issue Jan 15, 2025 · 3 comments

Comments

@neralen
Copy link

neralen commented Jan 15, 2025

Getting this error when running the bot from its directory
Haven't changed anything in the bot.py other than what is specified. I'm not entirely sure what I've managed to break. Can someone point me in the right direction?

\miniconda3\Lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Running without XTTS - no speech audio will be generated
2025-01-15 11:23:40 INFO discord.client logging in using static token
Traceback (most recent call last):
File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\http.py", line 816, in static_login
data = await self.request(Route('GET', '/users/@me'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\http.py", line 758, in request
raise HTTPException(response, 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:\sillytavern\openklyde-main\bot.py", line 895, in
client.run(discord_api_key)
File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\client.py", line 869, in run
asyncio.run(runner())
File "C:\Users\YuuMa\miniconda3\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\YuuMa\miniconda3\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\YuuMa\miniconda3\Lib\asyncio\base_events.py", line 686, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\client.py", line 858, in runner
await self.start(token, reconnect=reconnect)
File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\client.py", line 786, in start
await self.login(token)
File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\client.py", line 620, in login
data = await self.http.static_login(token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\http.py", line 820, in static_login
raise LoginFailure('Improper token has been passed.') from exc
discord.errors.LoginFailure: Improper token has been passed.

@badgids
Copy link
Owner

badgids commented Jan 15, 2025

Getting this error when running the bot from its directory Haven't changed anything in the bot.py other than what is specified. I'm not entirely sure what I've managed to break. Can someone point me in the right direction?

\miniconda3\Lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) Running without XTTS - no speech audio will be generated 2025-01-15 11:23:40 INFO discord.client logging in using static token Traceback (most recent call last): File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\http.py", line 816, in static_login data = await self.request(Route('GET', '/users/@me')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\http.py", line 758, in request raise HTTPException(response, 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:\sillytavern\openklyde-main\bot.py", line 895, in client.run(discord_api_key) File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\client.py", line 869, in run asyncio.run(runner()) File "C:\Users\YuuMa\miniconda3\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\YuuMa\miniconda3\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\YuuMa\miniconda3\Lib\asyncio\base_events.py", line 686, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\client.py", line 858, in runner await self.start(token, reconnect=reconnect) File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\client.py", line 786, in start await self.login(token) File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\client.py", line 620, in login data = await self.http.static_login(token) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\YuuMa\miniconda3\Lib\site-packages\discord\http.py", line 820, in static_login raise LoginFailure('Improper token has been passed.') from exc discord.errors.LoginFailure: Improper token has been passed.

First error: Make sure you have FFMPEG installed and it's bin path is in your system environment variables, or run it without the TTS

Last error: make sure you've set up your discord tokens properly

@neralen
Copy link
Author

neralen commented Jan 15, 2025

Fixed the install of ffmpeg and added to path. Now getting this error on launch. Already installed dependencies. But for some reason not finding a particular module to force download.

C:\SillyTavern\OpenKlyde-main\bot.py:524: SyntaxWarning: invalid escape sequence '\!' "]|\!|\?|\.{1,}" Traceback (most recent call last): File "C:\SillyTavern\OpenKlyde-main\bot.py", line 2, in <module> import discord File "C:\Python313\Lib\site-packages\discord\__init__.py", line 23, in <module> from .client import * File "C:\Python313\Lib\site-packages\discord\client.py", line 51, in <module> from .sku import SKU, Entitlement File "C:\Python313\Lib\site-packages\discord\sku.py", line 31, in <module> from .app_commands import MissingApplicationID File "C:\Python313\Lib\site-packages\discord\app_commands\__init__.py", line 12, in <module> from .commands import * File "C:\Python313\Lib\site-packages\discord\app_commands\commands.py", line 53, in <module> from .models import Choice File "C:\Python313\Lib\site-packages\discord\app_commands\models.py", line 44, in <module> from ..member import Member File "C:\Python313\Lib\site-packages\discord\member.py", line 33, in <module> import discord.abc File "C:\Python313\Lib\site-packages\discord\abc.py", line 59, in <module> from .voice_client import VoiceClient, VoiceProtocol File "C:\Python313\Lib\site-packages\discord\voice_client.py", line 35, in <module> from .player import AudioPlayer, AudioSource File "C:\Python313\Lib\site-packages\discord\player.py", line 29, in <module> import audioop ModuleNotFoundError: No module named 'audioop'

Threw the error in markdown for legibility.

@badgids
Copy link
Owner

badgids commented Jan 16, 2025

Rapptz/discord.py#9742

Use a virtual environment or conda environment. I always use python 3.10 for compatability with the majority of AI libraries and tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants