Bug report #15850

QGIS 2.18 - Randon points inside polygon (variable) - Not working

Added by Hugo Nicolau Barbosa de Gusmão over 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Processing/QGIS
Affected QGIS version:2.18.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23768

Description

I tried using real numbers, integers, integers 64 and the error persists.

"Uncaught error while executing algorithm
Traceback (most recent call last):
File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\\processing\\core\\GeoAlgorithm.py", line 203, in execute
self.processAlgorithm(progress)
File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\\processing\\algs\\qgis\\RandomPointsPolygonsVariable.py", line 96, in processAlgorithm
pointCount = int(f[fieldName])
TypeError: int() argument must be a string or a number, not 'QPyNullVariant'"

Associated revisions

Revision 5c521db9
Added by Alexander Bruy almost 7 years ago

[processing] handle NULL fields in the Random Points in Polygons (fix #15850)

History

#1 Updated by Hugo Nicolau Barbosa de Gusmão over 7 years ago

Same error in 2.16.3:
  • File "C:/PROGRA~1/QGIS2~1.16/apps/qgis/./python/plugins\\processing\\algs\\qgis\\RandomPointsPolygonsVariable.py", line 96, in processAlgorithm
    pointCount = int(f[fieldName])
    TypeError: int() argument must be a string or a number, not 'QPyNullVariant'*

#2 Updated by Hugo Nicolau Barbosa de Gusmão about 7 years ago

Same error in 2.18.3

#3 Updated by Alexander Bruy almost 7 years ago

  • Operating System deleted (Windows 10)
  • Category set to Processing/QGIS
  • Target version deleted (Version 2.18)
  • OS version deleted (64bits)

#4 Updated by Alexander Bruy almost 7 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF