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

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720) #35

Closed
ndee85 opened this issue Jan 24, 2018 · 6 comments
Closed

Comments

@ndee85
Copy link
Contributor

ndee85 commented Jan 24, 2018

Hi,
I am trying to implement the addon updater into my addon. I have setup all basic steps. I left the repo and user name at defaults by now. Just to see if it gets a connection.

At work we use a proxy to connect to the internet. Could it be related to that?

Unfortunately I get the error message above. And within the blender console I get these errors:

Getting tags from server Exception in thread Thread-3: Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\threading.py ", line 914, in _bootstrap_inner self.run() File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\threading.py ", line 862, in run self._target(*self._args, **self._kwargs) File "C:\Users\g041481\AppData\Roaming\Blender Foundation\Blender\2.79\scripts \addons\coa_tools\addon_updater.py", line 1309, in async_check_update self.check_for_update(now=now) File "C:\Users\g041481\AppData\Roaming\Blender Foundation\Blender\2.79\scripts \addons\coa_tools\addon_updater.py", line 1035, in check_for_update self.get_tags() # sets self._tags and self._tag_latest File "C:\Users\g041481\AppData\Roaming\Blender Foundation\Blender\2.79\scripts \addons\coa_tools\addon_updater.py", line 523, in get_tags self._prefiltered_tag_count = len(all_tags) TypeError: object of type 'NoneType' has no len()

Later I will check this from home and see if it works. I will report back. Still would be great if this works with a proxy so my colleagues could update the addon without hassle in the future.

@ndee85
Copy link
Contributor Author

ndee85 commented Jan 24, 2018

Forgot to mention that the "URL error, check internet connection" exception is thrown.

@ndee85
Copy link
Contributor Author

ndee85 commented Jan 24, 2018

Ok.. I think I found a solution. It did have nothing to do with proxy settings. Its a problem with the ssl context. I found a solution on this site:
https://forum.manjaro.org/t/how-to-disable-ssl-verification-for-git-etc-through-proxy/20215

Basicall I just needed to import ssl
and then add the proper context to the openurl functions like that:

context = ssl._create_unverified_context()
urllib.request.urlopen(request,context=context)

Would be cool if this can be added by default.

@TheDuckCow
Copy link
Collaborator

TheDuckCow commented Jan 27, 2018 via email

@ndee85
Copy link
Contributor Author

ndee85 commented Jan 30, 2018

Hi,
here is the pull request. You may want to take a look and see if its ok.
#36

TheDuckCow added a commit to Moo-Ack-Productions/MCprep that referenced this issue Feb 11, 2018
@TheDuckCow
Copy link
Collaborator

Thanks again for the contribution, now merged (and now even used by one of my other addons)!

@Alzy
Copy link

Alzy commented Mar 14, 2023

Instead of disabling ssl certificate verification and possibly causing security threats, use the certifi module as @john-shine proposed here. This example uses aiohttp but should lead you in the right direction even if you're using a different module.

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

No branches or pull requests

3 participants