-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In the case of vector input with some field types set to 0
length as Decimal (double) field
in the screenshot below exactextract
library raises RuntimeError.
The field unknown_field_length
is the one raising error. Integer
fields with 0
lengths are not raising errors.
The same error is raised if String
field has 0
length.
Full exception traceback:
2025-03-17T20:02:25 WARNING An error has occurred while executing Python code:
RuntimeError: Unhandled type for field unknown_length_field in PyFeatureBase::field_type
Traceback (most recent call last):
File "C:\Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\zonal_exact\task_classes.py", line 76, in run
result_stats = exact_extract(
File "E:\OSGeo4W\apps\Python39\lib\site-packages\exactextract\exact_extract.py", line 476, in exact_extract
processor.process()
RuntimeError: Unhandled type for field unknown_length_field in PyFeatureBase::field_type
Python version: 3.9.18 (heads/master:5eba59e, Feb 1 2024, 20:02:10) [MSC v.1929 64 bit (AMD64)]
QGIS version: 3.36.0-Maidenhead Maidenhead, 09951dc0
My first intuition is that the error comes from the fact that QGIS use Qt field types (https://doc.qt.io/qt-6/qttypes.html) and at some point in exactextract
it's incorrectly converted to the proper field type (0
field length).
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working