Python error with OpenLayers plugin QGIS 2
If the OpenLayers plugin fails with an error in 'getProxy', verify that the proxy settings in the options menu are correct.
FIY, the QGIS dev are thinking about deprecating the OpenLayers plugin in favor of QuickMapServices (already available in the extensions)
Why? It's mainly an outdated plugin you should avoid. It was useful some years ago but it doesn't deal well with projections.
I had the same problem and the solution was
settings>option>network (uncheck proxy)
And this was the end of my problem