johnpholden / qgis3redistricter

Redistricting for QGIS v3
GNU General Public License v3.0
5 stars 2 forks source link

Python error when creating plan #10

Closed MazRad closed 2 years ago

MazRad commented 2 years ago

Hi When I go to create a plan, I get a python error of:
self.totalpop = self.totalpop + int(feature[self.popfield]) TypeError: int() argument must be a string, a bytes-like object or a number, not 'QVariant'

I'm using StatsCan boundary and census data.

johnpholden commented 2 years ago

Hi, it looks like your population field isn't always defined as a number. I'll fix the plugin to handle the error better.

MazRad commented 2 years ago

Got it! Had a sneaky null value in there

johnpholden commented 2 years ago

Fantastic! Let me know if you have any more issues, an update will be sorted shortly