When downloading the dataset on the pytorch official website, an error is reported in sslcertverificationerror: [SSL: certificate_verify_failed]. The following is my solution.
Error reason: when opening HTTPS link with urllib, SSL certificate will be checked once. When the target website uses a self signed certificate, it will throw the error of urlib2.urlerror.
Solution: cancel certificate validation globally
Import SSL
SSL_ create_ default_ https_ context = ssl._ create_ unverified_ context
Reference article link: https://blog.csdn.net/yixieling4397/article/details/79861379
Read More:
- URLError: urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)
- python:urllib2.URLError urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
- A download error occurred while downloading data from pytorch. Urllib.error.urlerror: < urlopen error [SSL: certificate_verify_failed]
- Cannot set up a python SDK Python 2.7. The SDK sees invalid
- Solution to “An error occurred while loading the archive” appears when decompressing the rar file compressed package
- Solution to communication link failure with error in idea startup project
- Solution: vs currently does not hit the breakpoint and has not loaded any symbols for the document
- Configure HTTPS and self signed certificate for nginx
- Android Failure [INSTALL_ FAILED_ VERSION_ Downgrad] solutions
- The idea code pushes to GitHub and reports an error fatal: unable to access
- How to solve “import cv2 failed ImportError: DLL load fail: Cannot find the specified module” in Anaconda environment
- server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
- How to configure OpenGL with CodeBlocks in Ubuntu
- Configuration of OpenGL under CodeBlocks and solutions to problems encountered
- Using np.set in Python 3_ Printoptions (threshold = NP. Nan) raises an error resolution
- Error: l6242e: cannot link object arm_ cos_ f32.o as its attributes are incompat
- json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- CMake_ Compiling VTK_ 9.0.0 running vtkcommoncolor DLL has access conflict
- Tensorflow with tf.Session The usage of () as sess
- Troubleshooting of ROS rosdep init / update