Let’s talk about the situation at that time. Because there is no cifar10 data set on this machine, when downloading cifar10 with the following code:
trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
download=True, transform=transform)
Certificate verify failed: the error message certificate has expired appears.
Later, I found that the following two lines can be added to the file header:
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
Done! happy
Read More:
- python minio client Error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certific
- python3 ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833) Error
- Pycharm WebSocket Error: Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
- [Solved] pip install Error: There was a problem confirming the ssl certificate…
- There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)-skipping
- [Solved] Python Error: An attempt has been made to start a new process before the current process has finished …
- [Solved] PyQt: RuntimeError: wrapped C/C++ object has been deleted & has no attribute of flush in python
- Invalid python sd, Fatal Python error: init_fs_encoding: failed to get the Python cod [How to Solve]
- [Solved] Linux OS python Script Error: smtplib has no attribute SMTP_SSL
- Python 3 urllib has no URLEncode attribute
- Python writes DICOM file (attributeerror: ‘filemetadataset’ object has no attribute ‘transfersyntax uid’ solution)
- [Modified] AttributeError: ‘socket‘ object has no attribute ‘ioctl‘ python linux
- Python scatter chart error: TypeError: object of type ‘NoneType’ has no len()
- [Solved] Python Keras Error: AttributeError: ‘Sequential‘ object has no attribute ‘predict_classes‘
- [Solved] opencv-python: recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all‘ failed
- Python Openyxl Error: AttributeError: ‘int‘ object has no attribute ‘upper‘ [How to Solve]
- How to Solve Python AttributeError: ‘module’ object has no attribute ‘xxx’
- [Solved] Python 3.6 Error: ‘dict’ object has no attribute ‘has_key’
- [Solved] Python Error: AttributeError: partially initialized module ‘keyword‘ has no attribute ‘kwlist‘
- [Solved] Selenium python send_key error: list object has no attribute