sparqlunicorn / sparqlunicornGoesGIS

SPARQLing Unicorn QGIS Plugin (Documentation: https://sparqlunicorn.github.io/sparqlunicornGoesGIS/)
https://plugins.qgis.org/plugins/sparqlunicorn/
GNU General Public License v2.0
27 stars 6 forks source link

The SPARQL query is missing the following mandatory variables #29

Closed Msch0150 closed 2 years ago

Msch0150 commented 2 years ago

sparqlunicorn-0.13.1

Query > Configure TripleStores > Choos Triple Store "Nomisma" (or any other store):

The SPARQL query is missing the following mandatory variables:

"" (empty)

In addition (maybe as a follow up error) no changes can be made to the configuration nor a new tripel store can be created. The roor message is:

Ein Fehler trat bei der Ausführung von Python-Code auf:

TypeError: init() missing 3 required positional arguments: 'permanentAdd', 'parentdialog', and 'progress' Traceback (most recent call last): File "C:\Users/myname/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\sparqlunicorn\dialogs\triplestoredialog.py", line 159, in applyCustomSPARQLEndPoint if not self.testTripleStoreConnection(True): File "C:\Users/myname/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\sparqlunicorn\dialogs\triplestoredialog.py", line 82, in testTripleStoreConnection self.qtask=DetectTripleStoreTask("Checking connection to triple store "+self.tripleStoreEdit.text()+"...",self.triplestoreconf,self.tripleStoreEdit.text(),self.tripleStoreNameEdit.text(),True,False,self.prefixes,self.prefixstore,self.tripleStoreChooser,self.comboBox,False,None,progress) TypeError: init() missing 3 required positional arguments: 'permanentAdd', 'parentdialog', and 'progress'

Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS-Version: 3.18.3-Zürich Zürich, 735cc85be9

situx commented 2 years ago

Thank you for your bug report!

Yes, the configuration dialog is partly unfinished, due to the implementation of the autodetection feature. The idea would be that minimal configuration is necessary for a triple store. I am also thinking about removing the dialog or massively simplifying it because the configuration options are getting quite numerous (not all configuration settings are in the configuration dialog anyway) and most users will not be familiar with all the configuration settings anyway. Any suggestions welcome here!

I suggest you try the autodetection (usually this is sufficient to include your triple store) If you have special configuration needs, just send us an email and we can look into your case. The manual way would be to edit the JSON file in QGIS_PLUGIN_PATH/conf/triplestoreconf.json We can provide you a JSON snippet for your configuration if needed.

Msch0150 commented 2 years ago

Thanks for your quick response.

I think you mean by "autodetection" the button "Detect Configuration". So that the user just enteres a URL in the field "Triple Store URL", like "http://nomisma.org/query". But whenever I try the "Detect Configuration" I do get the same error message as the above:

Ein Fehler trat bei der Ausführung von Python-Code auf:

TypeError: init() missing 3 required positional arguments: 'permanentAdd', 'parentdialog', and 'progress' Traceback (most recent call last): File "C:\Users/jhunke/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\sparqlunicorn\dialogs\triplestoredialog.py", line 90, in detectTripleStoreConfiguration self.qtask=DetectTripleStoreTask("Detecting configuration for triple store "+self.tripleStoreEdit.text()+"...",self.triplestoreconf,self.tripleStoreEdit.text(),self.tripleStoreNameEdit.text(),False,True,self.prefixes,self.prefixstore,self.tripleStoreChooser,self.comboBox,False,None,progress) TypeError: init() missing 3 required positional arguments: 'permanentAdd', 'parentdialog', and 'progress'

Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS-Version: 3.18.3-Zürich Zürich, 735cc85be9

Python-Pfad: C:\Users\myname\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\sparqlunicorn\dependencies C:\Users/myname/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\LAStools C:/PROGRA~1/QGIS31~1.3/apps/qgis/./python C:/Users/myname/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/myname/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA~1/QGIS31~1.3/apps/qgis/./python/plugins C:\Program Files\QGIS 3.18.3\bin\python39.zip C:\PROGRA~1\QGIS31~1.3\apps\Python39\DLLs C:\PROGRA~1\QGIS31~1.3\apps\Python39\lib C:\Program Files\QGIS 3.18.3\bin C:\PROGRA~1\QGIS31~1.3\apps\Python39 C:\PROGRA~1\QGIS31~1.3\apps\Python39\lib\site-packages C:\PROGRA~1\QGIS31~1.3\apps\Python39\lib\site-packages\win32 C:\PROGRA~1\QGIS31~1.3\apps\Python39\lib\site-packages\win32\lib C:\PROGRA~1\QGIS31~1.3\apps\Python39\lib\site-packages\Pythonwin C:/Users/myname/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/myname/Documents/myname/mylocation

So I do not have the experience yet to build my own suggestion for the needed/desired configurations via the UI yet. Anyhow: I think that the modification via the conf file should be doable. It looks like that the current implementation copies the triplestoredialog.py to triplestoreconf_personal.json. A modification in one of these files is not recognized by the plugin. That means that for any modification of the file a restart of the QGIS is required. If a conf file is the way to go than it would help a lot to reread the conf automatically once its got modified.

situx commented 2 years ago

Some observations from my side:

In a nutshell: You should be fine with the "Quick Add Endpoint" Dialogue in most cases

Msch0150 commented 2 years ago

I checked "Quick Add Endpoint". Looks quite sufficient.

situx commented 2 years ago

Version 0.14 improved the Quick Add Dialog and the configuration dialog to solve these problems. Closing this one