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

Plugin error while installing/upgrading v0.8 (Python 3.7.0, QGIS version: 3.8.2, Win10) #14

Closed sfkeller closed 4 years ago

sfkeller commented 4 years ago

While trying to install or upgrade this plugin v0.8 I get error "AttributeError: 'NoneType' object has no attribute 'isatty'" : See below.

Couldn't load plugin 'sparqlunicorn' due to an error when calling its classFactory() method 

AttributeError: 'NoneType' object has no attribute 'isatty' 
Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 334, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/sfkeller/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\sparqlunicorn\__init__.py", line 35, in classFactory
    from .sparql_unicorn import SPAQLunicorn
  File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/sfkeller/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\sparqlunicorn\sparql_unicorn.py", line 38, in 
    import rdflib
  File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 737, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\rdflib\__init__.py", line 78, in 
    if not hasattr(__main__, '__file__') and sys.stdout.isatty():
AttributeError: 'NoneType' object has no attribute 'isatty'

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
QGIS version: 3.8.2-Zanzibar Zanzibar, 4470baa1a3 
(Windows 10)

Python Path:
C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python
C:/Users/sfkeller/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/sfkeller/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.8\bin\python37.zip
C:\PROGRA~1\QGIS3~1.8\apps\Python37\DLLs
C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib
C:\Program Files\QGIS 3.8\bin
C:\PROGRA~1\QGIS3~1.8\apps\Python37
C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages
C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\Pythonwin
C:/Users/sfkeller/AppData/Roaming/QGIS/QGIS3\profiles\default/python
.
C:\Users\sfkeller\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\vector_tiles_reader\ext-libs
situx commented 4 years ago

Hello thank you for your interest in our plugin, you are likely getting this error because you did not install the dependencies for the plugin. Please have a look at our repository for dependencies. https://github.com/sparqlunicorn/unicornQGISdepInstaller The dependencies need to be installed before installing the plugin and whenever you install a new version of QGIS. Let us know if this solves your problem!

situx commented 4 years ago

Please also be aware that because of a bug in rdflib installing the dependencies SPARQLWrapper and rdflib manually will not work. For now you need to use our installer because it includes a patched version of rdflib which solves the issue you are describing. This issue is also still open to be solved but depends on a change in rdflib that we filed at their bug tracker https://github.com/RDFLib/rdflib/pull/945

situx commented 4 years ago

Thanks to support we received at FOSSGIS we will soon be shipping a new version which bundles the dependencies. Then there will be no need for the dependency installer anymore. Stay tuned!

situx commented 4 years ago

Version 0.10 fixes this issue, as the correct dependencies are now bundled with the plugin.

sfkeller commented 4 years ago

Nice.

Don't forget to update the description in metadata.txt too https://github.com/sparqlunicorn/sparqlunicornGoesGIS/blob/master/sparql_unicorn/metadata.txt#L13

While speaking about metadata.txt I usually propose in any case (and in addition to the common publishing guidelines: http://plugins.qgis.org/publish/ ) to write a consice description text section there.

situx commented 4 years ago

Thank you for the suggestion. I forgot to commit the metadata update into the master branch. Done now.