Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
UrbanPlan-LDB opened this issue Mar 14, 2023 · 4 comments

Comments

@UrbanPlan-LDB
Copy link

Impossibile caricare il plugin 'Discovery' a causa di un errore chiamando il metodo classFactory()
Steps to reproduce

  1. First
  2. Second
  3. Third
Traceback (most recent call last):
  File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:\Users/Lucio De Benedictis/AppData/Roaming/QGIS/QGIS3\profiles\Lucio_02_23/python/plugins\Discovery\__init__.py", line 16, in classFactory
    return DiscoveryPlugin(iface)
  File "C:\Users/Lucio De Benedictis/AppData/Roaming/QGIS/QGIS3\profiles\Lucio_02_23/python/plugins\Discovery\discoveryplugin.py", line 153, in __init__
    self.rubber_band = QgsRubberBand(iface.mapCanvas(), False)
TypeError: QgsRubberBand(): argument 2 has unexpected type 'bool'

Discovery 2.5.7, QGIS 3.30.0-'s-Hertogenbosch on Windows 10

@reginaldc
Copy link

I had the same error. I tried installing discovery on QGIS 3.30.2 with new profile.

@reginaldc
Copy link

I solved the problem by changing line 153 in discoveryplugin.py to
self.rubber_band = QgsRubberBand(iface.mapCanvas(), QgsWkbTypes.PolygonGeometry)

@UrbanPlan-LDB
Copy link
Author

UrbanPlan-LDB commented Mar 27, 2023 via email

@reginaldc
Copy link

reginaldc commented Mar 27, 2023 via email

gangerang added a commit to gangerang/qgis-discovery-plugin that referenced this issue Apr 30, 2023
Bug fix for Issue lutraconsulting#90, Uncaught TypeError: QgsRubberBand(): argument 2 has unexpected type 'bool'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants