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

Unavailable certificate when reading prebid bidder-data.csv #104

Closed
dshore opened this issue May 24, 2022 · 0 comments
Closed

Unavailable certificate when reading prebid bidder-data.csv #104

dshore opened this issue May 24, 2022 · 0 comments
Labels
bug Something isn't working in DEV Resolution is in DEV release

Comments

@dshore
Copy link
Collaborator

dshore commented May 24, 2022

Description

Some users may get the following when code tries to access the bidder-data.csv file:

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>

Fix

Specify trusted CA certificates:

import certifi
import ssl
from urllib import request

context = ssl.create_default_context(cafile=certifi.where())

_x = [l.decode('utf-8') for l in \
      request.urlopen('https://docs.prebid.org/dev-docs/bidder-data.csv',
                      context=context).readlines()]
@dshore dshore added the bug Something isn't working label May 24, 2022
dshore added a commit that referenced this issue May 24, 2022
Specify CA file when reading bidders data file (#104)
@dshore dshore added the in DEV Resolution is in DEV release label May 24, 2022
@dshore dshore closed this as completed May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in DEV Resolution is in DEV release
Projects
None yet
Development

No branches or pull requests

1 participant