k8thekat / GatekeeperV2

Update to Gatekeeper
GNU General Public License v3.0
27 stars 11 forks source link

Instillation fails windows #97

Closed aminoginji closed 9 months ago

aminoginji commented 9 months ago

Which Platform?

Windows 11

Describe the bug

Error during manual install

Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: aiohttp==3.7.4.post0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 1)) (3.7.4.post0) Requirement already satisfied: async-timeout==3.0.1 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 2)) (3.0.1) Requirement already satisfied: attrs==21.4.0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 3)) (21.4.0) Requirement already satisfied: certifi==2021.10.8 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 4)) (2021.10.8) Requirement already satisfied: chardet==4.0.0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 5)) (4.0.0) Requirement already satisfied: charset-normalizer==2.0.10 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 6)) (2.0.10) Requirement already satisfied: docopt==0.6.2 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 7)) (0.6.2) Requirement already satisfied: ffmpeg-python==0.2.0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 8)) (0.2.0) Requirement already satisfied: future==0.18.2 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 9)) (0.18.2) Requirement already satisfied: gitdb==4.0.9 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 10)) (4.0.9) Requirement already satisfied: GitPython==3.1.27 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 11)) (3.1.27) Requirement already satisfied: haggis==0.5.0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 12)) (0.5.0) Requirement already satisfied: idna==3.3 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 13)) (3.3) Requirement already satisfied: imageio-ffmpeg==0.4.7 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 14)) (0.4.7) Requirement already satisfied: multidict==6.0.4 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 15)) (6.0.4) Requirement already satisfied: nbtlib==2.0.4 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 16)) (2.0.4) Requirement already satisfied: numpy in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 17)) (1.26.3) Requirement already satisfied: Pillow>=9.2.0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 18)) (10.2.0) Requirement already satisfied: pipreqs==0.4.11 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 19)) (0.4.11) Requirement already satisfied: pyotp==2.6.0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 20)) (2.6.0) Requirement already satisfied: python-dotenv==0.19.2 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 21)) (0.19.2) Requirement already satisfied: requests==2.27.0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 22)) (2.27.0) Requirement already satisfied: smmap==5.0.0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 23)) (5.0.0) Requirement already satisfied: typing_extensions==4.0.1 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 24)) (4.0.1) Requirement already satisfied: urllib3==1.26.7 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 25)) (1.26.7) Requirement already satisfied: yarg==0.1.9 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 26)) (0.1.9) Requirement already satisfied: yarl in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 27)) (1.9.4) Requirement already satisfied: discord.py>=2.0.0 in c:\users\anime\appdata\roaming\python\python312\site-packages (from -r C:\Users\anime\Desktop\Discord Bot\requirements.txt (line 28)) (2.3.2) 01/30/2024 10:51:40 PM [Gatekeeper] [INFO] DB Handler Initialization...DB Version: 3.0 01/30/2024 10:51:40 PM [Gatekeeper] [INFO] SQL Database Version: 3.0 // SQL Database: True 01/30/2024 10:51:40 PM [AMP Handler] [INFO] AMPHandler is validating your token file... 01/30/2024 10:51:40 PM [AMP Handler] [WARNING] Checking Session: 0 for proper permissions... 01/30/2024 10:51:41 PM [AMP Handler] [INFO] We have proper permissions on AMP 01/30/2024 10:51:41 PM [AMP Handler] [INFO] SUCCESS Found Factorio01 in the Database. 01/30/2024 10:51:41 PM [AMP Handler] [INFO] SUCCESS Found VRising01 in the Database. 01/30/2024 10:51:41 PM [AMP Handler] [INFO] SUCCESS Found ARK01 in the Database. 01/30/2024 10:51:41 PM [AMP Handler] [INFO] SUCCESS Found Palworld01 in the Database. 01/30/2024 10:51:41 PM [AMP Handler] [INFO] SUCCESS Found Enshrouded01 in the Database. 01/30/2024 10:51:41 PM [AMP Handler] [WARNING] ATTENTION Removing Discordbot from Super Admins Role! 01/30/2024 10:51:42 PM [Gatekeeper] [WARNING] PyNaCl is not installed, voice will NOT be supported 01/30/2024 10:51:42 PM [Gatekeeper] [INFO] Gatekeeper v2 Intializing... 01/30/2024 10:51:42 PM [Gatekeeper] [INFO] Discord Version: 2.3.2 // Gatekeeper v2 Version: beta-4.7.2 // Python Version 3.12.1 (tags/v3.12.1:2305ca5, Dec 7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)] 01/30/2024 10:51:42 PM [Gatekeeper] [INFO] logging in using static token Traceback (most recent call last): File "C:\Users\anime\AppData\Roaming\Python\Python312\site-packages\discord\http.py", line 803, in static_login data = await self.request(Route('GET', '/users/@me')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\anime\AppData\Roaming\Python\Python312\site-packages\discord\http.py", line 745, 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:\Users\anime\Desktop\Discord Bot\start.py", line 107, in Start = Setup() ^^^^^^^ File "C:\Users\anime\Desktop\Discord Bot\start.py", line 87, in init discordBot.client_run(tokens) File "C:\Users\anime\Desktop\Discord Bot\discordBot.py", line 435, in client_run client.run(tokens.token, reconnect=True, log_handler=None) File "C:\Users\anime\AppData\Roaming\Python\Python312\site-packages\discord\client.py", line 860, in run asyncio.run(runner()) File "C:\Program Files\Python312\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Program Files\Python312\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python312\Lib\asyncio\base_events.py", line 684, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\anime\AppData\Roaming\Python\Python312\site-packages\discord\client.py", line 849, in runner await self.start(token, reconnect=reconnect) File "C:\Users\anime\AppData\Roaming\Python\Python312\site-packages\discord\client.py", line 777, in start await self.login(token) File "C:\Users\anime\AppData\Roaming\Python\Python312\site-packages\discord\client.py", line 612, in login data = await self.http.static_login(token) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\anime\AppData\Roaming\Python\Python312\site-packages\discord\http.py", line 807, in static_login raise LoginFailure('Improper token has been passed.') from exc discord.errors.LoginFailure: Improper token has been passed.


aminoginji commented 9 months ago

added correct token to tokens.py and still get this issue

k8thekat commented 9 months ago

Hey first off thanks for the report.

If you are still getting that error I would recommend double checking your token and make sure no extra spaces/etc.

aminoginji commented 9 months ago

ya i did i generated a new one as well, trying to redownload the discord.py now

aminoginji commented 9 months ago

redownloaded discord.py, then changed my token again and still the same issue does the bot have to be open to the public?

k8thekat commented 9 months ago

No, but if you are getting that token error I would make sure there is no extra spaces.

Try changing from single quotes to double.. etc..

aminoginji commented 9 months ago

I changed to " " add in a blank space and deleted a blank space, copy direct from discord dev copy button and still no luck

k8thekat commented 9 months ago

How long is the token? Have you set up a bot before? I worry that you may not be copying the secret token.

aminoginji commented 9 months ago

i just had https://github.com/winglessraven/AMP-Discord-Bot setup working fine but wanted a full bot for all servers not just per module

aminoginji commented 9 months ago

i can change it after but this was the last token generated virc_jCmilhIQBsa-iQLre_2KJreYAfn

k8thekat commented 9 months ago

Yea then you are copying the right token in.. interesting.. are you pasting the code into AMP or the token.py file? If it's in AMP I dont think you need quotes.

aminoginji commented 9 months ago

token.py

k8thekat commented 9 months ago

That's really strange. I can possibly assist more tomorrow, but its late and its bed time for me tonight.

I feel like we are overlooking something or somehow a variable/file is messed up.

aminoginji commented 9 months ago

np ill keep trying things

aminoginji commented 9 months ago

ill rezip and resetup the tokentemplate.py, no luck with that

aminoginji commented 9 months ago

Yea then you are copying the right token in.. interesting.. are you pasting the code into AMP or the token.py file? If it's in AMP I dont think you need quotes.

is tokenstemplate.py rename token.py or tokens.py because if i change it to token.py i get different errors

k8thekat commented 9 months ago

Yea then you are copying the right token in.. interesting.. are you pasting the code into AMP or the token.py file? If it's in AMP I dont think you need quotes.

is tokenstemplate.py rename token.py or tokens.py because if i change it to token.py i get different errors

It's tokens.py

aminoginji commented 9 months ago

so i set it up in the amp instance and get the same issue. Gonna try making a new bot and see if that changes anything

aminoginji commented 9 months ago

and that didn't fix anything

aminoginji commented 9 months ago

cant think of any issue on my end now that I've run it in the docker container 8/

aminoginji commented 9 months ago

01/31/2024 05:51:54 PM [Gatekeeper] [INFO] Discord Version: 2.3.2 // Gatekeeper v2 Version: beta-4.7.2 // Python Version 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] 01/31/2024 05:51:54 PM [Gatekeeper] [INFO] logging in using static token Traceback (most recent call last): File "/AMP/gatekeeperv2/venv/lib/python3.11/site-packages/discord/http.py", line 803, in static_login data = await self.request(Route('GET', '/users/@me')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/AMP/gatekeeperv2/venv/lib/python3.11/site-packages/discord/http.py", line 745, 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 "/AMP/gatekeeperv2/GatekeeperV2-main/start.py", line 107, in Start = Setup() ^^^^^^^ File "/AMP/gatekeeperv2/GatekeeperV2-main/start.py", line 87, in init discordBot.client_run(tokens) File "/AMP/gatekeeperv2/GatekeeperV2-main/discordBot.py", line 435, in client_run client.run(tokens.token, reconnect=True, log_handler=None) File "/AMP/gatekeeperv2/venv/lib/python3.11/site-packages/discord/client.py", line 860, in run asyncio.run(runner()) File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/AMP/gatekeeperv2/venv/lib/python3.11/site-packages/discord/client.py", line 849, in runner await self.start(token, reconnect=reconnect) File "/AMP/gatekeeperv2/venv/lib/python3.11/site-packages/discord/client.py", line 777, in start await self.login(token) File "/AMP/gatekeeperv2/venv/lib/python3.11/site-packages/discord/client.py", line 612, in login data = await self.http.static_login(token) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/AMP/gatekeeperv2/venv/lib/python3.11/site-packages/discord/http.py", line 807, in static_login raise LoginFailure('Improper token has been passed.') from exc discord.errors.LoginFailure: Improper token has been passed.

log for container

aminoginji commented 9 months ago

is there a quick code i can add to see the token being passed?

aminoginji commented 9 months ago

"you only get 401's if the auth header is missing or invalid"

what i got from discord api help

aminoginji commented 9 months ago

found the issue you dont want CLIENT SECRET you want the bot token the instructions are incorrect

Discord server connection oAuth token aka 'client secret'

this should be bot token