I think you want to:
1. Change `from astropy.extern.six.moves.urllib.request import urlopen` to `from astropy.extern.six.moves.urllib import request`
2. Change `_urlopen = urlopen` to `_urlopen = request.urlopen`

The point of monkeypatching is that you're modifying the underlying package; changing local variables has no effect.  

I don't know what this has to do with the error you saw, though, unfortunately... that just doesn't make sense.