1

Trying to use the Connect Points plugin. I can install it no problem, but when I click Plugins > Connect Points > Settings, I get the error. I have tried re-installing the plugin, uninstalling and installing again. Have also searched for some kind of plugin cache I can clear, but no joy. The stack trace is below, is anyone able to help please?

AttributeError: 'builtin_function_or_method' object has no attribute 'messageBar' Traceback (most recent call last): File "C:\Users/rdeacon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\connect_points\qgis_connect_points.py", line 96, in showSettings dlg = Dialog( File "C:\Users/rdeacon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\connect_points\dialog.py", line 164, in init self.fillControls( File "C:\Users/rdeacon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\connect_points\dialog.py", line 190, in fillControls layerFrom = self.getQGISLayer(curPointsLayerFrom) File "C:\Users/rdeacon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\connect_points\dialog.py", line 235, in getQGISLayer QgisPlugin(iface=self.parent).showMessageForUser( File "C:\Users/rdeacon/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\connect_points\qgis_plugin.py", line 82, in showMessageForUser self._iface.messageBar().pushMessage( AttributeError: 'builtin_function_or_method' object has no attribute 'messageBar'

1 Answer 1

3

I guess you found a bug. For a temporary solution, you can try the follows:

  1. Go to the plugin folder (Settings > User Profiles > Open Active Profile Folder, and navigate to python > plugins > connect_points)

  2. Open qgis_connect_points.py. Add a new argument, as in the image (Line 103-104):

    103    self._iface.mainWindow(), self._iface
    

    enter image description here

  3. Open dialog.py. Add iface=None and self._iface = iface to __init__ as in the image:

    56  parent=None, iface=None
    
    59  self._iface = iface
    

    enter image description here

  4. Change self.parent to self._iface around Line ~235-240

    enter image description here

  5. Restart QGIS.

2
  • I'm getting a new error now 'Couldn't load plugin 'connect_points' due to an error when calling its classFactory() method // TabError: inconsistent use of tabs and spaces in indentation' Followed by some file references, then the same TabError again. Note - I don't have a code editor with numbered lines, and don't have permissions to install software on my computer, so it's possible I made the edits in the wrong places, as I was doing my best with windows notepad. Are you able to provide a little more context with your screenshots so I can make sure I 've edited correctly please? Dec 6, 2022 at 21:52
  • Check indentation. It should be as in the image. Dec 8, 2022 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.