Forums

Error from Squid when opening https address from googleapis.com (using free account)

I am using urllib.urlopen method to send a GET query to https://maps.googleapis.com and I am getting the following error. It is working fine when using http but I need https in order to send a project key so I can have my own quota. Is this some kind of bug? Any workaround besides upgrading to hacker account (will do probably but I'm testing the environment first)

Thanks!!

ERROR
The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: https://maps.googleapis.com/maps/api/geocode/json?

Unsupported Request Method and Protocol

Squid does not support all request methods for all access protocols. For example, you can not POST a Gopher request.
Your cache administrator is webmaster.

urllib doesn't play nice with https proxies. I would suggest using requests instead.

You are right, using requests works fine :)

Thanks!!!!

Incidentally, we've also had reports that the Python 3 version of urlopen does work. So, yet another reason to switch to 3!