[Django] #28441: Wrong parsing of GEOS library version string in "contrib/gis/geos/libgeos.py"

129 views
Skip to first unread message

Django

unread,
Jul 27, 2017, 1:22:18 PM7/27/17
to django-...@googlegroups.com
#28441: Wrong parsing of GEOS library version string in
"contrib/gis/geos/libgeos.py"
-----------------------------------------+------------------------
Reporter: vonabarak | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Importing some classes (e.g. from
django.contrib.gis.db.backends.base.features import BaseSpatialFeatures)
using libgeos.py causes 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"
I have been investigated this problem a bit. The reason is probably wrong
version_regex in line 182 of libgeos.py
Exactly part corresponding to parse commit id (or whatever means "
4d2925d6" in version_string)

Use django 1.11 on freebsd 11

--
Ticket URL: <https://code.djangoproject.com/ticket/28441>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 27, 2017, 1:56:32 PM7/27/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* component: Uncategorized => GIS
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
* type: Uncategorized => Cleanup/optimization


Comment:

[https://github.com/django/django/pull/8817 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:1>

Django

unread,
Jul 31, 2017, 6:20:56 AM7/31/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: GIS | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Hisham waleed karam):

the same error here

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:2>

Django

unread,
Jul 31, 2017, 7:07:15 AM7/31/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: GIS | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by yardensachs):

4d2925d6 is the commit for 3.6.2 tagged on:
https://github.com/OSGeo/geos/tree/4d2925d6e0c758742a178053132eef02cd8374d2

So it looks like the commit hash was added to the version string.

And it looks like this is the commit that changed the version:
https://github.com/OSGeo/geos/commit/cc5e205e5b4c7d4ee567bf39a548e65ecf51dd0e
More specifically:
https://github.com/OSGeo/geos/commit/cc5e205e5b4c7d4ee567bf39a548e65ecf51dd0e
#diff-8dd96440c9832c59176dcaa7c346b982

Hoped this help.

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:3>

Django

unread,
Aug 1, 2017, 3:18:50 PM8/1/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: GIS | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham):

I guess we should fix this on 1.11.x so we don't block the use of newer
versions of GEOS there. [https://github.com/django/django/pull/8841 PR for
stable/1.11.x]

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:4>

Django

unread,
Aug 2, 2017, 9:46:16 AM8/2/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: GIS | Version: 1.11
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"78c155cf2e5a27fd2db18c2d46953b1b0fdba829" 78c155c]:
{{{
#!CommitTicketReference repository=""
revision="78c155cf2e5a27fd2db18c2d46953b1b0fdba829"
Fixed #28441 -- Fixed GEOS version parsing with a commit hash at the end.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:5>

Django

unread,
Aug 2, 2017, 10:02:33 AM8/2/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody

Type: Cleanup/optimization | Status: closed
Component: GIS | Version: 1.11
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"a49764dd9daa11c4e24bad84423f71711b3e0de0" a49764dd]:
{{{
#!CommitTicketReference repository=""
revision="a49764dd9daa11c4e24bad84423f71711b3e0de0"
[1.11.x] Fixed #28441 -- Fixed GEOS version parsing with a commit hash at
the end.

A less invasive backport of 78c155cf2e5a27fd2db18c2d46953b1b0fdba829
from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:6>

Django

unread,
Aug 2, 2017, 11:08:50 AM8/2/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody

Type: Cleanup/optimization | Status: closed
Component: GIS | Version: 1.11
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Johannes Hoppe):

Is this scheduled to be released soon?

If anyone has this issue on macOS and does not know how to solve it, this
should do the trick:


{{{
brew switch geos 3.6.1
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:7>

Django

unread,
Aug 2, 2017, 2:31:33 PM8/2/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody

Type: Cleanup/optimization | Status: closed
Component: GIS | Version: 1.11
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham):

Bug fix releases happen monthly, usually on the first of the month.

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:8>

Django

unread,
Sep 3, 2017, 10:01:53 AM9/3/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: GIS | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by will):

* status: closed => new
* resolution: fixed =>


Comment:

I met this kind of problem in Mac OS 10.12.6, django version 1.11.4.
My geos version is 3.6.2. I installed the plugins using brew.

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:9>

Django

unread,
Sep 3, 2017, 10:04:05 AM9/3/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: GIS | Version: 1.11
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by yardensachs):

* status: new => closed
* resolution: => fixed


Comment:

This was fixed in 1.11.15 (which will be released this week)

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:10>

Django

unread,
Dec 14, 2017, 9:18:26 AM12/14/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: GIS | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Rudolph Froger):

* status: closed => new
* resolution: fixed =>


Comment:

Please also fix this in Django 1.8.

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:11>

Django

unread,
Dec 14, 2017, 9:39:58 AM12/14/17
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: GIS | Version: 1.11
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Simon Charette):

* status: new => closed
* resolution: => fixed


Comment:

Rudolph, please take the time to read our
[https://docs.djangoproject.com/en/2.0/internals/release-process
/#backwards-compatibility-policy backporting policy] to understand why
this wasn't backported to 1.8 before re-opening a closed ticket.

At this point, and when this ticket was reported as well,
[https://www.djangoproject.com/download/#supported-versions only security
fixes and data loss bug qualify for a 1.8 backport].

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:12>

Django

unread,
Oct 23, 2019, 11:09:11 AM10/23/19
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody

Type: Cleanup/optimization | Status: closed
Component: GIS | Version: 1.11
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Nik Nyby):

I'm running into this problem in Django 1.11.25, Debian testing/bullseye:

{{{
File "/home/nik/src/d/blackrock/ve/lib/python3.7/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.8.0-CAPI-1.13.1 "
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:13>

Django

unread,
Oct 24, 2019, 2:44:22 AM10/24/19
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody

Type: Cleanup/optimization | Status: closed
Component: GIS | Version: 1.11
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by felixxm):

Nikolas, thanks for this report, however Django 1.11 doesn't receive
bugfixes anymore (it is in extended support).

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:14>

Django

unread,
Dec 3, 2019, 10:52:15 AM12/3/19
to django-...@googlegroups.com
#28441: GEOS version parsing fails if it has a trailing hash
--------------------------------------+------------------------------------
Reporter: vonabarak | Owner: nobody

Type: Cleanup/optimization | Status: closed
Component: GIS | Version: 1.11
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by scorpp):

Replying to [comment:13 Nikolas Nyby]:

Had same issue today. Resolved by downgrading geos to 3.7.2 and gdal to
3.0.1.

--
Ticket URL: <https://code.djangoproject.com/ticket/28441#comment:15>

Reply all
Reply to author
Forward
0 new messages