Bug report #2406
QgsRubberBand python bindings broken
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Borys Jurgiel | ||
Category: | Python plugins | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 12466 |
Description
In r12834 python bindings for QgsRubberBand have become broken. Calling some methods causes errors like "TypeError: argument 1 of QgsRubberBand.addPoint() has an invalid type". The worst case is the SelectPlus plugin crashing whole application.
History
#1 Updated by Jürgen Fischer almost 15 years ago
works fine here. Please include steps to reproduce and/or a backtrace.
#2 Updated by Borys Jurgiel almost 15 years ago
Try to use the QgsRubberBand.addPoint in the python console:
from qgis.gui import *
QgsRubberBand(qgis.utils.iface.mapCanvas()).addPoint(QgsPoint())
Is it working for you? I can't provide any backtrace now as I had to downgrade to the d8e8ee46 (SVN r12834). Will do it as soon as I'm able to pause the current work;)
#3 Updated by Borys Jurgiel almost 15 years ago
(Saying "working" I mean not returning the "invalid argument type" error)
#4 Updated by Martin Dobias almost 15 years ago
- Resolution set to fixed
- Status changed from Open to Closed
Just tried out your code snippet: got the invalid argument type error, removed python subdir in my build directory, built and installed again, now it works fine.
I believe this is a build problem that happens when only core or gui python module gets rebuilt and the bindings get out of sync. Should be fixed in 34766114 (SVN r12855).