unable to get local issuer certificate (_ssl.c:1002)
时间: 2023-10-14 10:17:21 浏览: 166
This error typically occurs when the SSL certificate of the remote server cannot be verified by the local system. Here are a few steps you can try to resolve the issue:
1. Verify your system's date and time: Ensure that the date and time on your local system are set correctly. An incorrect date/time can cause SSL certificate verification failures.
2. Update the CA certificates: Install or update the CA (Certificate Authority) certificates on your system. These certificates are used to verify the authenticity of SSL certificates. You can search for instructions specific to your operating system on how to update or install CA certificates.
3. Disable SSL verification (not recommended): If you are in a development environment or trust the remote server, you can temporarily disable SSL verification. However, this is not recommended for production environments and can expose you to security risks.
In Python, you can disable SSL verification using the `verify` parameter in requests library:
```python
import requests
requests.get(url, verify=False)
```
4. Check your firewall or antivirus settings: Sometimes, firewalls or antivirus software can interfere with SSL certificate verification. Temporarily disabling them or reconfiguring their settings might help resolve the issue.
If none of these steps work, please provide more information about your specific setup and the context in which you encounter this error.
阅读全文