py3: convert URL to str before passing it to request

Authored by Kwan.