Title: setup downloads sometimes fails CERTIFICATE_VERIFY_FAILED · Issue #14169 · matplotlib/matplotlib · GitHub
Open Graph Title: setup downloads sometimes fails CERTIFICATE_VERIFY_FAILED · Issue #14169 · matplotlib/matplotlib
X Title: setup downloads sometimes fails CERTIFICATE_VERIFY_FAILED · Issue #14169 · matplotlib/matplotlib
Description: Bug report Sometimes (depending on how Python has been installed) one might see a
Open Graph Description: Bug report Sometimes (depending on how Python has been installed) one might see a X Description: Bug report Sometimes (depending on how Python has been installed) one might see a <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificat...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/14169
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"setup downloads sometimes fails CERTIFICATE_VERIFY_FAILED","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\nSometimes (depending on how Python has been installed) one might see a \r\n```bash\r\n\u003curlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)\u003e\r\n```\r\nerror.\r\n\r\n**Fix**\r\n\r\nThe easy fix is to ensure `certifi` certificates path is added to the `urlopen` method.\r\n\r\nI.e. in your `setupext.py` you may need:\r\n```python\r\nimport certifi\r\n with urlopen(\r\n Request(url, headers={\"User-Agent\": \"\"}), cafile=certifi.where()) as req:\r\n file_contents = BytesIO(req.read())\r\n```\r\n\r\nProbably there needs to be some try-execpt-(import certifi-fix) to handle this.\r\n\r\n**Matplotlib version**\r\n\r\nThis happens when `setup.py` tries to download files, e.g. the recent change to jquery download. So basically I have only seen this in 2.2.4 and 3.0.3.\r\n\r\nAgreed, this may be because my installation is not the same as system installations, but it may happen elsewhere I guess.\r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/zerothi","@type":"Person","name":"zerothi"},"datePublished":"2019-05-08T12:01:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/14169/matplotlib/issues/14169"}
route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:198b3ed9-5909-d06f-6787-dbb2a4336ca8 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id B492:33E60B:2D42D9:3C2D9B:6A52EBA0 html-safe-nonce 2e0f6f89a1fd757ddfe79b91d4aee9f13d8f6be5df39b95ca108dfd4bb57942a visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDkyOjMzRTYwQjoyRDQyRDk6M0MyRDlCOjZBNTJFQkEwIiwidmlzaXRvcl9pZCI6IjE2MzI3MTQ0NjMzOTUzNzYwMzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac e0f030ba45cad5f17cc45beb027a6fc6384b0180b8043996603175d00c9c7b17 hovercard-subject-tag issue:441699402 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/14169/issue_layout twitter:image https://opengraph.githubassets.com/65d700967d9c57e8889ad9782eb1d56cfe651bc574811ee702647047c4c30d88/matplotlib/matplotlib/issues/14169 twitter:card summary_large_image og:image https://opengraph.githubassets.com/65d700967d9c57e8889ad9782eb1d56cfe651bc574811ee702647047c4c30d88/matplotlib/matplotlib/issues/14169 og:image:alt Bug report Sometimes (depending on how Python has been installed) one might see a og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username zerothi hostname github.com expected-hostname github.com None b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb turbo-cache-control no-preview go-import github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git octolytics-dimension-user_id 215947 octolytics-dimension-user_login matplotlib octolytics-dimension-repository_id 1385122 octolytics-dimension-repository_nwo matplotlib/matplotlib octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 1385122 octolytics-dimension-repository_network_root_nwo matplotlib/matplotlib turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release 07a982c1d40157c619b364352b704c3ce66bb332 ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.