siddvish21 / aternos-discord-bot

5 stars 1 forks source link

Keep getting this error when trying to log in, Information is correct #3

Closed Panderz360 closed 1 year ago

Panderz360 commented 1 year ago

Traceback (most recent call last): File "C:\Users\Panderz\Pictures\Workspaces\aternos-discord-bot.venv\Lib\site-packages\discord\client.py", line 441, in _run_event await coro(*args, *kwargs) File "C:\Users\Panderz\Pictures\Workspaces\aternos-discord-bot\discord_bot_aternos.py", line 30, in on_message api = Client.from_credentials(os.getenv('USERNAME'), os.getenv('PASSWORD')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Panderz\Pictures\Workspaces\aternos-discord-bot.venv\Lib\site-packages\python_aternos\atclient.py", line 146, in from_credentials return cls.from_hashed( ^^^^^^^^^^^^^^^^ File "C:\Users\Panderz\Pictures\Workspaces\aternos-discord-bot.venv\Lib\site-packages\python_aternos\atclient.py", line 111, in from_hashed raise CredentialsError( python_aternos.aterrors.CredentialsError: Check your username and password ERROR:discord.client:Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\Panderz\Pictures\Workspaces\aternos-discord-bot.venv\Lib\site-packages\discord\client.py", line 441, in _run_event await coro(args, **kwargs) File "C:\Users\Panderz\Pictures\Workspaces\aternos-discord-bot\discord_bot_aternos.py", line 30, in on_message api = Client.from_credentials(os.getenv('USERNAME'), os.getenv('PASSWORD')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Panderz\Pictures\Workspaces\aternos-discord-bot.venv\Lib\site-packages\python_aternos\atclient.py", line 146, in from_credentials return cls.from_hashed( ^^^^^^^^^^^^^^^^ File "C:\Users\Panderz\Pictures\Workspaces\aternos-discord-bot.venv\Lib\site-packages\python_aternos\atclient.py", line 111, in from_hashed raise CredentialsError( python_aternos.aterrors.CredentialsError: Check your username and password

siddvish21 commented 1 year ago

Hi,

I believe the issue you're facing might be related to conflicts between the username environment variable in Windows and the username environment variable you're trying to set for your Aternos bot.

To solve this issue, you can try changing the name of your environment variable to something like ATERNOS_USERNAME and updating your bot code to use this new variable instead.

Please let me know if this helps, or if you have any further questions.

Thanks!

Panderz360 commented 1 year ago

After Adjusting the code and fixing the .env file it worked perfectly thanks :D