#29959 closed Bug (fixed)
Random LooseVersion errors while getting multiple wkb values
Reported by: | Claude Paroz | Owned by: | nobody |
---|---|---|---|
Component: | GIS | Version: | 2.1 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
From [f185d929fa1c0caa], each call to geometry wkb
value (used in the json representation) will call GEOSversion()
to test a corner case condition.
Unfortunately and randomly, this causes 'LooseVersion' object has no attribute 'version'
errors. It might be memory related because the same operation sometimes fails, sometimes succeeds in the exact same code conditions.
It's hard to know what part of the code to blame, but I would argue that calling a GEOS method for each wkb value retrieval is suboptimal, as the GEOS version should not change between server restart. We may find a way to cache the GEOS version between calls.
Suggested fix