Skip to content

TypeError: QgsRubberBand(): argument 2 has unexpected type 'bool' #15

Description

@mathuin

https://api.qgis.org/api/api_break.html#qgis_api_break_3_0_QgsRubberBand

The QgsRubberBand() signature has changed.

Thanks to this, I was able to fix the issue by importing QgsWktTypes from qgis.core and changing line 397 to:

        self.extent = QgsRubberBand(self.canvas, QgsWkbTypes.PolygonGeometry)

With these changes, I was able to create a reasonable-looking PNG. Hope this helps!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions