Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fatal Python error: deallocating None (during grid encoding) #1221

springmeyer opened this Issue · 7 comments

3 participants


To support filtering truly null values from postgres (vs attributes not existing) this change was made to the postgis driver as part of #794.

To support this, in python, the value_converter returns Py_None, but this is a 'bare' Py_None will leak unless reference counted. Thanks to @migurski and @nvkelso for uncovering this bug.


fixed in master (future 2.1.x) in ebfbe79 and backported to 2.0.x (future 2.0.2) in 92dd305


So good, thank you!

Do you know what the release schedule for 2.0.2 on Ubuntu looks like? Is there one?


I'll look for a moment to tag and release next week. Then we'd look for @dpaleino (of to initiate debian packaging, as he's the official packager. Only after he has packaged for debian do the ubuntu guys follow.


And until then pull from the unofficial PPA I maintain at


@springmeyer I was working right now for 2.0.1, since I received a mail from a user, and I totally missed that one release. Then I'll just wait and upload 2.0.2, if that's ok with you. Hoping that a nice and smooth transition is feasible :)

@strk strk referenced this issue from a commit in strk/mapnik
@springmeyer springmeyer python: fix leaky Py_None return by calling Py_INCREF(Py_None) before…
… returning - closes #1221

@dpaleino - yes, going to look for time this week to tag 2.0.2.


@dpaleino - hey there, 2.0.2 is now officially out with this fix, please feel free to package:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.