Opened 12 years ago
Closed 7 years ago
#20036 closed Bug (fixed)
django.contrib.gis.geos.error.GEOSException: Could not parse version info string "3.4.0dev-CAPI-1.8.0 r0"
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | GIS | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | mmitar@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Can't use the module because version string of GEOS ends with "r0".
Change History (17)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 12 years ago
Component: | Uncategorized → GIS |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
comment:5 by , 11 years ago
comment:7 by , 11 years ago
Replying to claudep:
Sorry, but 1.4 is in security-fix only mode, no other fixes can go in.
AFAIK GEOS/GDAL has been updated due to vulnerability in one of their libs. Not fixing this will force 1.4 users to:
a) patch it manually (forces keeping 1.4 fork)
b) upgrade to 1.5 (forces gis upgrade)
c) use older and buggy GEOS/GDAL which leave them open to security issues
Also this supposed to be fixed in 1.3 #17212
Leaving 1.4 intentionally not fixed just doesn't sound right to me.
comment:9 by , 11 years ago
I preferred not to patch django so i "patched" geos lib. If you want to take this route, before doing brew install gdal, install geos using this recipe
comment:11 by , 11 years ago
Django 1.4.10
File "/Users/mau/.virtualenvs/newrunners/lib/python2.7/site-packages/django/contrib/gis/geos/libgeos.py", line 115, in geos_version_info if not m: raise GEOSException('Could not parse version info string "%s"' % ver) django.contrib.gis.geos.error.GEOSException: Could not parse version info string "3.4.2-CAPI-1.8.2 r3921"
Patched by change lingoes.py
from
# Regular expression should be able to parse version strings such as # '3.0.0rc4-CAPI-1.3.3', '3.0.0-CAPI-1.4.1' or '3.4.0dev-CAPI-1.8.0' version_regex = re.compile(r'^(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<subminor>\d+))((rc(?P<release_candidate>\d+))|dev)?-CAPI-(?P<capi_version>\d+\.\d+\.\d+)$') def geos_version_info():
to
# Regular expression should be able to parse version strings such as # '3.0.0rc4-CAPI-1.3.3', '3.0.0-CAPI-1.4.1' or '3.4.0dev-CAPI-1.8.0' version_regex = re.compile(r'^(?P<version>(?P<major>\d+)\.(?P<minor>\d+)\.(?P<subminor>\d+))((rc(?P<release_candidate>\d+))|dev)?-CAPI-(?P<capi_version>\d+\.\d+\.\d+).*$') def geos_version_info():
comment:12 by , 10 years ago
Considering that Django 1.5 is now unsupported while 1.4.x is an LTS version, would it make sense to look into adding this relatively minor fix? Otherwise we are essentially requiring them to update not just one version number but (at least) 2.
comment:13 by , 10 years ago
I've changed my mind about this, and agree it is a big annoyance, I'll backport the fix.
comment:15 by , 7 years ago
Still happens in probably every single version of Django from 1.6 at least up to 1.11.4, in Arch where the version is 3.6.2-CAPI-1.10.2 4d2925d6
The failure looks like this:
File "/run/media/artscoop/.../lib/python3.6/site-packages/django/contrib/gis/geos/__init__.py", line 18, in <module> HAS_GEOS = geos_version_info()['version'] >= '3.3.0' File "/run/media/artscoop/.../lib/python3.6/site-packages/django/contrib/gis/geos/libgeos.py", line 196, in geos_version_info raise GEOSException('Could not parse version info string "%s"' % ver) django.contrib.gis.geos.error.GEOSException: Could not parse version info string "3.6.2-CAPI-1.10.2 4d2925d6"
comment:16 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
comment:17 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Please avoid re-opening bugs closed for years.
This will be fixed in 1.11.5 which should be released this week. See #28441.
Is similar to #17212