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

Python certificates in Ubuntu #97

Open
claudio-dalicandro opened this issue Mar 5, 2021 · 1 comment
Open

Python certificates in Ubuntu #97

claudio-dalicandro opened this issue Mar 5, 2021 · 1 comment

Comments

@claudio-dalicandro
Copy link

claudio-dalicandro commented Mar 5, 2021

Hi!
I am trying to use an emacs package that makes use of python, currently I have set 3.8.6 as global version, but I get an error that googling seems to exist only in macOs (I am using ubuntu)

Error hitting url https://floobits.com/api/orgs/can/admin: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)

I have already reported this error to the authors of the package (Floobits/floobits-emacs#100), but I doubt that maybe this depends on my python installation, does this seem plausible to you?

@cho-m
Copy link

cho-m commented Mar 30, 2021

Just a comment that error seems to just be about SSL certificate issues.

Looking at the package you mentioned, the error is happening at:
https://github.com/Floobits/floobits-emacs/blob/master/floo/common/api.py#L125-L128

    cafile = os.path.join(G.BASE_DIR, 'floobits.pem')
    with open(cafile, 'wb') as cert_fd:
        cert_fd.write(cert.CA_CERT.encode('utf-8'))
    return urlopen(r, timeout=10, cafile=cafile)

You might want to make sure CA File ~/floobits/floobits.pem is valid/not-expired.

Other online topics on error are just related to updating your system SSL certificate files (using command on macOS or just pip install --upgrade certifi on other systems), but I am not familiar with the exact SSL flow.
Setting cafile=cafile may just override the system certificates.

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

No branches or pull requests

2 participants