GIScience / ohsome-qgis-plugin

ohsome Qgis plugin
MIT License
6 stars 1 forks source link

error when opening plugin window #26

Closed tyrasd closed 2 years ago

tyrasd commented 3 years ago

I get the following exception when trying to open the dialog window: Python error : An error has occurred while executing Python code: See message log (Python Error) for more details.. This is the stack trace:

An error has occurred while executing Python code: 

AttributeError: 'NoneType' object has no attribute 'provider_combo' 
Traceback (most recent call last):
  File "/home/…/.local/share/QGIS/QGIS3/profiles/default/python/plugins/OhsomeQgis/gui/OhsomeQgisDialog.py", line 239, in _init_gui_control
    self.dlg.provider_combo.currentIndexChanged.disconnect(
AttributeError: 'NoneType' object has no attribute 'provider_combo'

Further information:

MichaelsJP commented 3 years ago

Thx a lot. I'll have a look at it.

SlowMo24 commented 2 years ago

installed via download just now and got the same issue: QGis 3.16 on same Qt

SlowMo24 commented 2 years ago

I'm sorry but the problem only shifted to a different error message:

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

AttributeError: 'QComboBox' object has no attribute 'setPlaceholderText' 
Traceback (most recent call last):
  File "/home/mschott/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ohsomeTools/gui/OhsomeToolsDialog.py", line 222, in _init_gui_control
    self.dlg = OhsomeToolsDialog(
  File "/home/mschott/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ohsomeTools/gui/OhsomeToolsDialog.py", line 474, in __init__
    self.setupUi(self)
  File "/home/mschott/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ohsomeTools/gui/OhsomeToolsDialogUI.py", line 1032, in setupUi
    self.retranslateUi(OhsomeToolsDialogBase)
  File "/home/mschott/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ohsomeTools/gui/OhsomeToolsDialogUI.py", line 1086, in retranslateUi
    self.ohsome_spec_preference_combo.setPlaceholderText(
AttributeError: 'QComboBox' object has no attribute 'setPlaceholderText'

Python-Version: 3.8.10 (default, Jun  2 2021, 10:49:15) [GCC 9.4.0] 
QGIS-Version: 3.16.8-Hannover Hannover, 8c50902ea4 

Python-Pfad:
/usr/share/qgis/python
/home/mschott/.local/share/QGIS/QGIS3/profiles/default/python
/home/mschott/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages
/home/mschott/.local/share/QGIS/QGIS3/profiles/default/python
MichaelsJP commented 2 years ago

@SlowMo24 @tyrasd Really weird. I hoped to just catch the error but it seems as if there is a deeper reason to it. Do you have the same problem when installing orsTools?

@SlowMo24 You're using ubuntu 20.04 as well?

SlowMo24 commented 2 years ago

orsTools (via the plugin repository) works well and yes I'm on 20.04

MichaelsJP commented 2 years ago

I could reproduce it in a VM with Ubuntu 20.04. Solution: Removing the setPlaceholderText for the QcomboBox ohsome_spec_preference_combo fixes it.

Background The setPlaceholderText function was introduced in qt 5.15. many qgis versions still have smaller versions installed and the plugin would therefore crash due to QT not finding the function. The removal does not yield any negative sides for the plugin itself.

MichaelsJP commented 2 years ago

@tyrasd @SlowMo24 looking good for me. please let me know how this works for you. you get the correct version by updating it via qgis to 0.2.1-alpha.

SlowMo24 commented 2 years ago

works great! thanks!