BRGM / gml_application_schema_toolbox

GML Application Schema toolbox is a QGIS plugin allowing to manipulate OGC Complex Features
https://brgm.github.io/gml_application_schema_toolbox/
GNU General Public License v2.0
27 stars 18 forks source link

AttributeError: 'NoneType' object has no attribute 'split' #88

Open Tjeu opened 5 years ago

Tjeu commented 5 years ago

When I try to connect to the following service with WFS I get the error below: https://www.geoseaportal.de/inspire/services/TN_INSPIRE_DS

AttributeError: 'NoneType' object has no attribute 'split' 
Traceback (most recent call last):
  File "C:/Users/me/AppData/Roaming/QGIS/QGIS3\profiles\name/python/plugins\gml_application_schema_toolbox\gui\load_wizard_wfs.py", line 135, in on_connectBtn_clicked
    return self.on_connectBtn_clicked_()
  File "C:/Users/me/AppData/Roaming/QGIS/QGIS3\profiles\name/python/plugins\gml_application_schema_toolbox\gui\load_wizard_wfs.py", line 137, in on_connectBtn_clicked_
    wfs = self.wfs()
  File "C:/Users/me/AppData/Roaming/QGIS/QGIS3\profiles\name/python/plugins\gml_application_schema_toolbox\gui\load_wizard_wfs.py", line 118, in wfs
    with qgis_proxy_settings():
  File "C:/Users/me/AppData/Roaming/QGIS/QGIS3\profiles\name/python/plugins\gml_application_schema_toolbox\core\proxy.py", line 30, in __enter__
    excludes = excludes.split("|")
AttributeError: 'NoneType' object has no attribute 'split'
frankbroniewski commented 5 years ago

I just want to give feedback that I am also seeing this error. Windows 10, OSGeo4W-64 installation, QGIS 3.8.0 Sansibar, toolbox version 1.2.0 and btw. no proxies defined in QGIS ;-)

Just to give some more feedback: This actually happens while using the load wizard. I select the "load in relational mode" and in the following dialog I click "load layer list" and there the error occurs.

Further addendum from my QGIS console:

settings = QSettings()
f = settings.value("proxy/proxyExcludedUrls", "")
print(f)
None

I believe the test should include if excludes is not None somewhere there in addition.

frankbroniewski commented 5 years ago

85 is the same issue

HerzovanderWal commented 5 years ago

I'm having having the issue with loading the WFS-service: https://haleconnect.com/ows/services/org.292.c3955762-73a3-4c16-a15c-f3869487a1e3_wfs?VERSION=2.0.0 with the wizard. On the moment I connect. There is an error.

RuntimeError: Network problem when downloading https://haleconnect.com/ows/services/org.292.c3955762-73a3-4c16-a15c-f3869487a1e3_wfs?request=GetCapabilities&service=WFS&acceptversions=2.0.0,1.1.0,1.0.0

Traceback (most recent call last): File "C:/Users/Gebruiker/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\gui\load_wizard_wfs.py", line 135, in on_connectBtn_clicked return self.on_connectBtnclicked() File "C:/Users/Gebruiker/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\gui\load_wizard_wfs.py", line 137, in on_connectBtnclicked wfs = self.wfs() File "C:/Users/Gebruiker/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\gui\load_wizard_wfs.py", line 97, in wfs xml, ns_map = xml_parse(remote_open_from_qgis(final_url.toString())) File "C:/Users/Gebruiker/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\core\qgis_urlopener.py", line 54, in remote_open_from_qgis raise RuntimeError("Network problem when downloading {}".format(uri)) RuntimeError: Network problem when downloading https://haleconnect.com/ows/services/org.292.c3955762-73a3-4c16-a15c-f3869487a1e3_wfs?request=GetCapabilities&service=WFS&acceptversions=2.0.0,1.1.0,1.0.0

Python versie: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS versie: 3.8.0-Zanzibar Zanzibar, 11aff65f10

jannehsalo commented 4 years ago

I'm having the same issue.

AttributeError: 'NoneType' object has no attribute 'split' 
Traceback (most recent call last):
  File "/Users/janne/Library/Application Support/QGIS/QGIS3/profiles/default_broken/python/plugins/gml_application_schema_toolbox/gui/load_wizard_wfs.py", line 135, in on_connectBtn_clicked
    return self.on_connectBtn_clicked_()
  File "/Users/janne/Library/Application Support/QGIS/QGIS3/profiles/default_broken/python/plugins/gml_application_schema_toolbox/gui/load_wizard_wfs.py", line 137, in on_connectBtn_clicked_
    wfs = self.wfs()
  File "/Users/janne/Library/Application Support/QGIS/QGIS3/profiles/default_broken/python/plugins/gml_application_schema_toolbox/gui/load_wizard_wfs.py", line 118, in wfs
    with qgis_proxy_settings():
  File "/Users/janne/Library/Application Support/QGIS/QGIS3/profiles/default_broken/python/plugins/gml_application_schema_toolbox/core/proxy.py", line 30, in __enter__
    excludes = excludes.split("|")
AttributeError: 'NoneType' object has no attribute 'split'

I have been able find out that using clean newly-created unmodified user profile for QGIS allows to use plugin without error.

To create new default user profile from scratch: delete/rename "default" user profile in /Users/macos_username/Library/Application Support/QGIS/QGIS3/profiles. This causes QGIS to start as "newly installed" – you will get all the welcome messages etc.

To replicate previously described issue: make adjustments to QGIS preferences (which are saved in user profiles). I have tested following various changes in preferences and I'd like to generalize that any change to user profile causes the error (however this might not entirely true).

At least following changes cause the error:

Reverting changed QGIS preferences manually back to default options does not fix the error. Additionally using QGIS inbuilt "revert preferences to default" command does not fix the error either. It appears that only manually deleting/renaming default user profile in file system fixes the error.

Hope that this helps to solve the issue!

Version details macOS 10.13.6 QGIS 3.4.13-Madeira Madeira, 64ad560274 Python 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]

QGIS official all-in-one, signed macOS installers was used (not the legacy KyngChaos method)