Jump to content

Recommended Posts

Posted

Hi!

I have written a CGI script to start my discord bot and output any errors that may occur, and I keep getting this error:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

The full traceback is at https://pastebin.com/jWBLn6x0, sorry everything has the word "line" appended before it, it was how my script outputted the log.
If anyone could help that would be great!

Posted (edited)

We do have a tutorial about Discord bots, but it was written when we still used cPanel, so it may need to be adapted.

Anyway, here it goes: https://wiki.helionet.org/tutorials/discord-bot

Since I'm not a Python programmer, I am unable to help much further than that.

EDIT:

@rsa16, I talked with our staff about your case, and one of our root admins recommend that you use that code to solve your error:

import certifi
os.environ["SSL_CERT_FILE"] = certifi.where()

 

Edited by Kairion
Including possible solution.
Posted (edited)

Yeah, that's the exact tutorial I saw. I tried to get it to work on Plesk and I got pretty far except I encountered that error, and now I'm basically clueless. I think it has something to do with an outdated certificate but I'm not sure.

EDIT:
Sorry, I didn't refresh my page and see your edit, thanks for the solution, I'll try and see if it works!

Edited by rsa16
didn't refresh page and see the other edit
  • 2 months later...
Posted

Hi @rsa16

I'm also creating the Bot like you. The tutorial is out of date. What need to change in that tutorial ?
I only change the path to cgi-bin, from "public_html/cgi-bin" to "httpdocs/cgi-bin"

But when I access ...heliohost.us/cgi-bin/start.py, it gives:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

 

Also, no log file in 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...