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

20 Replies, 1230 Views

Yo, SSL errors are the worst. Had the same issue last week.

For python pip urllib.request, try this:

1. Update Python (older versions have cert issues).
2. Use `certifi.where()` to check if certs are found.

If all else fails, this hack works (but not for prod):

```python
import urllib.request
import ssl
context = ssl._create_unverified_context()
response = urllib.request.urlopen('https://example.com', context=context)
```

Messages In This Thread



Users browsing this thread: 3 Guest(s)