Jump to content

Discord bot cgi error


Recommended Posts

I fixed the cgi-bin folder so Python is working on the account now: https://kokofixcomputers.helioho.st/cgi-bin/test.py

That discord bot has so many issues though (a few are because that guide is ancient...)

  • Path to kokobot.py was wrong in start.py (guide inaccurate, home folders are now your main domain, not username).
  • Shebang lines in all scripts specified a python version that does not exist (guide inaccurate, Johnny has 3.6 and 3.10),
  • Permissions/owner were hosed on the cgi-bin folder because you deleted and recreated it (not sure if Plesk did this or you accidentally deleted it)
  • Permissions on kokobot.py were 757 when they should have been 755 (user error)
  • Line endings were not of type unix (common issue for Windows users, use Notepad++ if developing on a Windows box)

After fixing all of the above (some of them twice since I tried doing 2 things at once and accidentally set cgi-bin's owner to another user the first time), the start.py now works, but the bot itself (kokobot.py) seems to have an issue as it doesn't stay running.

You'll need to troubleshoot that. I'd bet that's going to be an issue with the code/module versions/etc. as I don't see anything obviously wrong at this point.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...