ultralytics / hub

Ultralytics HUB tutorials and support
https://hub.ultralytics.com
GNU Affero General Public License v3.0
115 stars 11 forks source link

Https connection pool error #744

Open bhavyabjb opened 5 days ago

bhavyabjb commented 5 days ago

Search before asking

Question

I trained a classification model on my custom data set in yolov8 and after that i wanted to predict some of my images but i got the following error when i tries running python code in visual studio code : "requests.exceptions.SSLError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/ultralytics/assets/releases/tags/v8.2.0 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1002)')))" ,,,, what shall i do in this case? How to fix this out?

Additional

No response

github-actions[bot] commented 5 days ago

👋 Hello @bhavyabjb, thank you for raising an issue about Ultralytics HUB 🚀! Please visit our HUB Docs to learn more:

If this is a 🐛 Bug Report, please provide screenshots and steps to reproduce your problem to help us get started working on a fix.

If this is a ❓ Question, please provide as much information as possible, including dataset, model, environment details etc. so that we might provide the most helpful response.

We try to respond to all issues as promptly as possible. Thank you for your patience!

pderrenger commented 4 days ago

@bhavyabjb hello,

Thank you for reaching out and providing details about the issue you're encountering. The error you're seeing, requests.exceptions.SSLError: HTTPSConnectionPool, typically indicates a problem with SSL certificate verification, which can occur due to various reasons such as network configuration or outdated packages.

To help us better understand and resolve the issue, could you please provide a minimal reproducible example of your code? This will allow us to replicate the problem on our end and offer a more precise solution. You can find guidance on how to create a minimal reproducible example here.

In the meantime, here are a few steps you can take to troubleshoot the issue:

  1. Update Packages: Ensure that you are using the latest versions of all relevant packages, including requests and yolov8. You can update them using pip:

    pip install --upgrade requests yolov8
  2. Verify SSL Certificates: Sometimes, SSL certificate issues can be resolved by updating your system's certificate store. On some systems, you can do this by running:

    pip install --upgrade certifi
  3. Network Configuration: If you are behind a corporate firewall or using a proxy, it might be interfering with SSL verification. You can try setting the REQUESTS_CA_BUNDLE environment variable to point to your certificate bundle:

    export REQUESTS_CA_BUNDLE=/path/to/your/certificate.pem
  4. Bypass SSL Verification: As a temporary workaround, you can bypass SSL verification by setting verify=False in your request. However, this is not recommended for production use due to security risks.

    import requests
    response = requests.get('https://api.github.com/repos/ultralytics/assets/releases/tags/v8.2.0', verify=False)

Please try these steps and let us know if the issue persists. Providing the minimal reproducible example will greatly assist us in diagnosing the problem further.

Thank you for your cooperation, and we look forward to helping you resolve this issue!