Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

processing ''Get online scripts' does not honor QGIS proxy settings? #21461

Closed
qgib opened this issue Sep 23, 2015 · 2 comments
Closed

processing ''Get online scripts' does not honor QGIS proxy settings? #21461

qgib opened this issue Sep 23, 2015 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Sep 23, 2015

Author Name: Richard Duivenvoorde (@rduivenvoorde)
Original Redmine Issue: 13412
Affected QGIS version: master
Redmine category:processing/core
Assignee: Victor Olaya


Testing the 'Get Online Scripts' here in a proxied environment.

It fails to get a connection. Probably because it does not use the proxy settings.

There are some plugins which do this right. I think the QuickMapServices plugin is the best one. As it uses a QNetworkRequest:

https://github.com/nextgis/quickmapservices/blob/master/src/extra_sources.py#L121-L148

I had a patch from somebody once too (see below), but the above is probably better :

https://github.com/rduivenvoorde/pdokservicesplugin/blob/master/pdokgeocoder.py#L24-L45

Traceback (most recent call last):
  File "C:/Users/operatortp/.qgis2/python/plugins\\processing\\gui\\ProcessingToolbox.py", line 223, in executeAlgorithm
    action.execute()
  File "C:/Users/operatortp/.qgis2/python/plugins\\processing\\gui\\GetScriptsAndModels.py", line 63, in execute
    dlg = GetScriptsAndModelsDialog(GetScriptsAndModelsDialog.SCRIPTS)
  File "C:/Users/operatortp/.qgis2/python/plugins\\processing\\gui\\GetScriptsAndModels.py", line 160, in __init__
    self.populateTree()
  File "C:/Users/operatortp/.qgis2/python/plugins\\processing\\gui\\GetScriptsAndModels.py", line 175, in populateTree
    resources = readUrl(self.urlBase + 'list.txt').splitlines()
  File "C:/Users/operatortp/.qgis2/python/plugins\\processing\\gui\\GetScriptsAndModels.py", line 118, in readUrl
    return urllib2.urlopen(url).read()
  File "C:\\osgeo4w\\apps\\Python27\\lib\\urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "C:\\osgeo4w\\apps\\Python27\\lib\\urllib2.py", line 404, in open
    response = self._open(req, data)
  File "C:\\osgeo4w\\apps\\Python27\\lib\\urllib2.py", line 422, in _open
    '_open', req)
  File "C:\\osgeo4w\\apps\\Python27\\lib\\urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "C:\\osgeo4w\\apps\\Python27\\lib\\urllib2.py", line 1222, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "C:\\osgeo4w\\apps\\Python27\\lib\\urllib2.py", line 1184, in do_open
    raise URLError(err)
URLError: 


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


QGIS version:
2.10.1-Pisa Pisa, d20c5b7

Python path: ['C:/Users/operatortp/.qgis2/python/plugins\\\\processing', 'C:\\\\Users\\\\operatortp\\\\.qgis2\\\\python\\\\plugins\\\\GeoCoding\\\\libs', 'C:/osgeo4w/apps/qgis/./python', u'C:/Users/operatortp/.qgis2/python', u'C:/Users/operatortp/.qgis2/python/plugins', 'C:/osgeo4w/apps/qgis/./python/plugins', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\distribute-0.6.24-py2.7.egg', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\mapproxy-1.4.0-py2.7.egg', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\pyyaml-3.10-py2.7-win32.egg', 'C:\\\\osgeo4w\\\\bin\\\\python27.zip', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\osgeo4w\\\\bin', 'C:\\\\osgeo4w\\\\apps\\\\Python27', 'c:\\\\osgeo4w\\\\apps\\\\python27\\\\lib\\\\site-packages\\\\jinja2-2.7.2-py2.7.egg', 'c:\\\\osgeo4w\\\\apps\\\\python27\\\\lib\\\\site-packages\\\\markupsafe-0.23-py2.7-win32.egg', 'c:\\\\osgeo4w\\\\apps\\\\python27\\\\lib\\\\site-packages\\\\python_dateutil-2.2-py2.7.egg', 'c:\\\\osgeo4w\\\\apps\\\\python27\\\\lib\\\\site-packages\\\\pytz-2014.2-py2.7.egg', 'c:\\\\osgeo4w\\\\apps\\\\python27\\\\lib\\\\site-packages\\\\shapely-1.2.18-py2.7-win32.egg', 'c:\\\\osgeo4w\\\\apps\\\\python27\\\\lib\\\\site-packages\\\\six-1.6.1-py2.7.egg', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\setuptools-0.6c11-py2.7.egg-info', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode', u'C:/Users/operatortp/.qgis2//python', 'C:\\\\Users\\\\operatortp\\\\.qgis2\\\\python\\\\plugins\\\\mmqgis/forms', 'C:\\\\Users\\\\operatortp\\\\.qgis2\\\\python\\\\plugins\\\\pdokbaggeocoder/forms', 'C:\\\\osgeo4w\\\\apps\\\\qgis\\\\python\\\\plugins\\\\fTools\\\\tools', 'C:/Users/operatortp/.qgis2']

@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2015

Author Name: Médéric RIBREUX (Médéric RIBREUX)


I've written a "PR":#2403 ...

@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2015

Author Name: Victor Olaya (@volaya)


Fixed in changeset "584c86d62949c0815e515ccefc25139919b9c29c".


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib added this to the Version 2.12 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant