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

TypeError: QgsWkbTypes.displayString(): argument 1 has unexpected type 'int' #62

Closed
merkato opened this issue Mar 16, 2023 · 2 comments
Closed

Comments

@merkato
Copy link

merkato commented Mar 16, 2023

Wersja QGIS: 3.30.0-'s-Hertogenbosch
Rewizja QGIS: f186b8efe0
Wersja Qt: 5.15.3
Wersja Pythona: 3.10.6
Wersja GDAL: 3.4.1
Wersja GEOS: 3.10.2-CAPI-1.16.0
Wersja PROJ: Rel. 8.2.1, January 1st, 2022
Wersja PDAL: 2.3.0 (git-version: Release)

Uruchamianie algorytmu 'Iso-Area as Pointcloud (from Layer)' …
Wprowadzone parametry:
{ 'DEFAULT_DIRECTION' : 2, 'DEFAULT_SPEED' : 5, 'DIRECTION_FIELD' : '', 'ENTRY_COST_CALCULATION_METHOD' : 1, 'ID_FIELD' : 'fid', 'INPUT' : 'memory://MultiLineString?crs=EPSG:2180&field=fid:long(0,0)&field=osm_id:string(10,0)&field=code:integer(0,0)&field=fclass:string(28,0)&field=name:string(100,0)&field=ref:string(20,0)&field=oneway:string(1,0)&field=maxspeed:integer(0,0)&field=layer:long(0,0)&field=bridge:string(1,0)&field=tunnel:string(1,0)&field=vmax:integer(0,0)&uid={e42b1c5b-3c8a-4ca8-8c01-61c5516e7cef}', 'MAX_DIST' : 900, 'OUTPUT' : 'TEMPORARY_OUTPUT', 'SPEED_FIELD' : 'vmax', 'START_POINTS' : 'memory://Point?crs=EPSG:2180&field=fid:integer(10,0)&uid={8ee0f89f-9054-48b7-8dad-a301931b63c3}', 'STRATEGY' : 1, 'TOLERANCE' : 3, 'VALUE_BACKWARD' : '', 'VALUE_BOTH' : '', 'VALUE_FORWARD' : '' }

[QNEAT3Algorithm] This is a QNEAT3 Algorithm: 'Iso-Area as Pointcloud (from Layer)'
Traceback (most recent call last):
File "/home/tomasz/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QNEAT3/algs/IsoAreaAsPointcloudFromLayer.py", line 211, in processAlgorithm
input_coordinates = getListOfPoints(startPoints)
File "/home/tomasz/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QNEAT3/Qneat3Utilities.py", line 90, in getListOfPoints
expected_geom_type = QgsWkbTypes.displayString(1) #Point
TypeError: QgsWkbTypes.displayString(): argument 1 has unexpected type 'int'

Execution failed after 0.09 sekund

Wczytywanie warstw wynikowych
Wykonano algorytm 'Iso-Area as Pointcloud (from Layer)'

merkato added a commit to merkato/QNEAT3 that referenced this issue Jun 16, 2023
@merkato
Copy link
Author

merkato commented Jun 16, 2023

There's API Break in QGIS 3.30 WkbTypes.displayString()
But using

given_geom_type = qgs_feature_storage.wkbType() #GetStringRepresentation of WKB Type
expected_geom_type = QgsWkbTypes().Point

resolves that problem in clean way. I don't how to add only one commit to pull request, as I have some other changes in my fork - adding #19 (must add zero value initialisation however)

@root676
Copy link
Owner

root676 commented Jun 17, 2023

Thanks for reporting the issue and providing a solution! I mentioned your contribution in the commit message and will add you to the changelog entry.

@root676 root676 closed this as completed Jun 17, 2023
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

3 participants
@merkato @root676 and others