I also had an issue with urlopen not working with DDGS, but I got past it, feel free to have a look here:
Basically, I rewrote download_images
to use the Python Requests library, an update to urllib.
However, further down, I had to address the urllib
issue directly. I had to create an unverified SSL context:
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
Note: this may entail some security issues, but I’m not sure what exactly. I know I can make HTTPS calls with the Python Requests library just fine, not sure why urllib verification was not working. But the code that calls urllib is too deep in the fastai code to work around, and all it is doing is grabbing the resnet18 weights from PyTorch Hub, so if you trust your local network and domain server I think it’s ok.