geopython / MetaSearch

*** We have moved! MetaSearch is now a core QGIS plugin! (2014-11-30). See QGIS repository
https://hub.qgis.org/wiki/quantum-gis/MetaSearch
Other
4 stars 12 forks source link

httpcachingproxy option cause error #57

Closed elyparker closed 10 years ago

elyparker commented 10 years ago

if i set proxy option in qgis network preferences as httpcachingproxy , the plugin doesn't work and give error:

Impossibile caricare il plugin MetaSearch a causa di errore chiamando il metodo initGui()

Traceback (most recent call last):
  File "C:/PROGRA~1/QGISVA~1/apps/qgis/./python\qgis\utils.py", line 213, in startPlugin
    plugins[packageName].initGui()
  File "C:/Documents and Settings/SALVO/.qgis2/python/plugins\MetaSearch\plugin.py", line 106, in initGui
    self.dialog = MetaSearchDialog(self.iface)
  File "C:/Documents and Settings/SALVO/.qgis2/python/plugins\MetaSearch\dialogs\maindialog.py", line 129, in __init__
    self.manageGui()
  File "C:/Documents and Settings/SALVO/.qgis2/python/plugins\MetaSearch\dialogs\maindialog.py", line 158, in manageGui
    self.install_proxy()
  File "C:/Documents and Settings/SALVO/.qgis2/python/plugins\MetaSearch\dialogs\maindialog.py", line 883, in install_proxy
    conn = '%s://%s%s%s' % (ptype, proxy_up, host, proxy_port)
UnboundLocalError: local variable 'ptype' referenced before assignment

Versione Python:
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

Versione di QGIS:
2.2.0-Valmiera Valmiera, c3a2817

for to work i nee to set proxy option as:

httpProxy

is it possible solve the problem?

tomkralidis commented 10 years ago

The proxy stuff happens in https://github.com/geopython/MetaSearch/blob/master/plugin/MetaSearch/dialogs/maindialog.py#L847.

So should this value be httpProxy and not HttpProxy?

elyparker commented 10 years ago

no, the option that give problem is a option of qgis 2.2 HttpCachingProxy with HttpProxy it doesn't give error httpcachingproxy

tomkralidis commented 10 years ago

@elyparker thanks. FYI this was fixed in https://github.com/geopython/MetaSearch/commit/69b9a367a81da7daebd195c0646ff09f87b53391.