Having issues with python pip urllib.request - anyone know how to fix common errors? or Best practice

20 Replies, 1187 Views

Ah, the classic SSL errors with python pip urllib.request. I’ve been there!

First, try updating your certifi package (`pip install --upgrade certifi`). If that doesn’t work, you might need to manually point to the certifi certs:

```python
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
```

But yeah, urllib.request is clunky. If you can, switch to `requests`—it’s way cleaner for HTTPS.

Messages In This Thread



Users browsing this thread: 1 Guest(s)