1

I have a QGIS project that I'm trying to export as a webapp with the WebAppBuilder plugin. For all my WMS from geoserver and GeoJSONs over the web, the app works fine. However, when I try to build the app with a WFS request, I get the following error:

An error has occurred while executing Python code:

InvalidSchema: No connection adapters were found for ' srsname='EPSG:3424' typename='hudsonparcels:testvwloc' url='http://(my ip here)/geoserver/hudsonparcels/wfs?service=WFS&version=1.1.0&REQUEST=GetCapabilities' Traceback (most recent call last): File "C:/Users/dcolombini/.qgis2/python/plugins\webappbuilder\maindialog.py", line 392, in preview problems = checkAppCanBeCreated(appdef) File "C:/Users/dcolombini/.qgis2/python/plugins\webappbuilder\appcreator.py", line 66, in checkAppCanBeCreated r = requests.get(url) File "C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\requests-2.9.1-py2.7.egg\requests\api.py", line 67, in get return request('get', url, params=params, *kwargs) File "C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\requests-2.9.1-py2.7.egg\requests\api.py", line 53, in request return session.request(method=method, url=url, *kwargs) File "C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\requests-2.9.1-py2.7.egg\requests\sessions.py", line 468, in request resp = self.send(prep, **send_kwargs) File "C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\requests-2.9.1-py2.7.egg\requests\sessions.py", line 570, in send adapter = self.get_adapter(url=request.url) File "C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\requests-2.9.1-py2.7.egg\requests\sessions.py", line 644, in get_adapter raise InvalidSchema("No connection adapters were found for '%s'" % url) InvalidSchema: No connection adapters were found for ' srsname='EPSG:3424' typename='hudsonparcels:testvwloc' url='http://(my ip here):8080/geoserver/hudsonparcels/wfs?service=WFS&version=1.1.0&REQUEST=GetCapabilities'

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS version: 2.16.0-Nødebo Nødebo, d0b3e39

Python Path: C:/PROGRA~1/QGIS21~1.0/apps/qgis/./python/plugins\processing C:/PROGRA~1/QGIS21~1.0/apps/qgis/./python C:/Users/dcolombini/.qgis2/python C:/Users/dcolombini/.qgis2/python/plugins C:/PROGRA~1/QGIS21~1.0/apps/qgis/./python/plugins C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\matplotlib-1.3.1-py2.7-win-amd64.egg C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\jsmin-2.2.0-py2.7.egg C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\gsconfig-0.6.9-py2.7.egg C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\httplib2-0.9-py2.7.egg C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\requests-2.9.1-py2.7.egg C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\jsbeautifier-1.6.2-py2.7.egg C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\six-1.10.0-py2.7.egg C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs\beautifulsoup-3.2.1-py2.7.egg C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\nose-1.3.3-py2.7.egg C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\tornado-4.0.1-py2.7-win-amd64.egg C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\backports.ssl_match_hostname-3.4.0.2-py2.7.egg C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\certifi-14.05.14-py2.7.egg C:\PROGRA~1\QGIS21~1.0\bin\python27.zip C:\PROGRA~1\QGIS21~1.0\apps\Python27\DLLs C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\plat-win C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\lib-tk C:\PROGRA~1\QGIS21~1.0\bin C:\PROGRA~1\QGIS21~1.0\apps\Python27 C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\PIL C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\win32 C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\win32\lib C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\Pythonwin C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\wx-2.8-msw-unicode C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg C:\PROGRA~1\QGIS21~1.0\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg C:/Users/dcolombini/.qgis2//python C:\Users\dcolombini.qgis2\python\plugins C:\Users\dcolombini.qgis2\python\plugins\webappbuilder\ext-libs C:/Users/dcolombini/.qgis2/python/plugins\webappbuilder C:/QGIS Projects

It may be a QGIS issue; I'm wondering if the problem is that QGIS lists the layer source data as the projection data and a bunch of other parameters as well as the URL instead of just the plain URL. Unfortunately, I can't directly edit the layer source in QGIS. I'm learning python currently and was trying to set up an action in QGIS with the QURL function to try and parse the source, but I'm not finding a lot of documentation on it.

  • Something looks odd to me, I see parameters like srsname='EPSG:3424' and typename='hudsonparcels:testvwloc' in combination with a url like url='http://(my ip here)/geoserver/hudsonparcels/wfs?service=WFS&version=1.1.0&REQUEST=GetCapabilities', the oddity for me is you don't use srsname and typename with a GetCapabiliites request, so possibly you need to specify the url as simply http://(my ip here)/geoserver/hudsonparcels/wfs? to do a GetFeature request (if that is the intention). Also I see that you have 1.1.0 but without GDAL or a plugin QGIS only supports 1.0.0 – nmtoken Oct 29 '16 at 14:43
  • Yes, that was my thinking as well. Unfortunately, the way QGIS is set up is that those parameters (which are the projection and workspace/store of the data in GeoServer) are required for the data to load into QGIS (you also cant edit the source directly, unfortunately). I'm hoping the QGIS development team will be able to address this issue in future updates. I have been looking into "actions" in QGIS that would allow a python script to parse the source of the layer to only return the URL, but I can't find much documentation on that kind of development. I'll also look into the GDAL – GIS87 Oct 31 '16 at 12:54
  • So I added some lines in the webappbuilder's python script to clip the source in the webappbuilder: code source = layer.source() cut1=re.search(r"url=(.*?)(?:&|$)", source).groups(0)[0] cut2 = cut1.split("ows?")[0] + "wfs?service=WFS&version=1.1.0&REQUEST=GetCapabilities" url = cut2.split("'")[1] Now the webappbuilder is saying that JSONP is not supported in the server, however I already edited the XML to enable jsonp and restart the service. The code seems to look at the get capabilities request and returns the error if it can't find "text/javascript" – GIS87 Nov 13 '16 at 16:55
  • Well you may have a bug then if QGIS is expecting text/javascript as a MIME type for JSONP, and you should probably switch to the QGIS forums/issues wiki to help you get support/resolution. – nmtoken Nov 25 '16 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.