lutraconsulting / qgis-discovery-plugin

Provides search / gazetteer functionality in QGIS using PostGIS-based data
http://www.lutraconsulting.co.uk/products/discovery/
GNU General Public License v2.0
15 stars 16 forks source link

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

Open UrbanPlan-LDB opened 1 year ago

UrbanPlan-LDB commented 1 year ago

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 commented 1 year ago

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

reginaldc commented 1 year ago

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

UrbanPlan-LDB commented 1 year ago

Very good Job.

Da: reginaldc @.> Inviato: lunedì 27 marzo 2023 14:06 A: lutraconsulting/qgis-discovery-plugin @.> Cc: @.; Author @.> Oggetto: Re: [lutraconsulting/qgis-discovery-plugin] Uncaught TypeError: QgsRubberBand(): argument 2 has unexpected type 'bool' (Issue #90)

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

— Reply to this email directly, view it on GitHubhttps://github.com/lutraconsulting/qgis-discovery-plugin/issues/90#issuecomment-1485026097, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A53WUFBONI5TU5MLAJFZ6DLW6F7BZANCNFSM6AAAAAAV2TULIM. You are receiving this because you authored the thread.Message ID: @.**@.>>

reginaldc commented 1 year ago

Also i had to import QgsWkbTypes from qgis.core

Regards,

Reginald Carlier Deskundige GIS Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster T+32 51 33 74 39www.ingelmunster.be Wij werken enkel op afspraak Schrijf je in op onze nieuwsbrief! Raadpleeg onze disclaimer Van: UrbanPlan-LDB @.> Verzonden: maandag 27 maart 2023 14:31 Aan: lutraconsulting/qgis-discovery-plugin @.> CC: Reginald Carlier @.>; Comment @.> Onderwerp: Re: [lutraconsulting/qgis-discovery-plugin] Uncaught TypeError: QgsRubberBand(): argument 2 has unexpected type 'bool' (Issue #90)

Very good Job.

Da: reginaldc @.<mailto:@.>> Inviato: lunedì 27 marzo 2023 14:06 A: lutraconsulting/qgis-discovery-plugin @.<mailto:@.>> Cc: @.<mailto:@.>; Author @.<mailto:@.>> Oggetto: Re: [lutraconsulting/qgis-discovery-plugin] Uncaught TypeError: QgsRubberBand(): argument 2 has unexpected type 'bool' (Issue #90)

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

— Reply to this email directly, view it on GitHubhttps://github.com/lutraconsulting/qgis-discovery-plugin/issues/90#issuecomment-1485026097, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A53WUFBONI5TU5MLAJFZ6DLW6F7BZANCNFSM6AAAAAAV2TULIM. You are receiving this because you authored the thread.Message ID: @.**@.mailto:***@***.******@***.***>>

— Reply to this email directly, view it on GitHubhttps://github.com/lutraconsulting/qgis-discovery-plugin/issues/90#issuecomment-1485050286, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFIMGFYUNIY2MAWTQDZWXFTW6GB7RANCNFSM6AAAAAAV2TULIM. You are receiving this because you commented.Message ID: @.**@.>>