#28509: Can't parse GEOS version installed with homebrew
--------------------------------------+------------------------
               Reporter:  Andrey      |          Owner:  nobody
                   Type:  Bug         |         Status:  new
              Component:  GIS         |        Version:  1.8
               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           |
--------------------------------------+------------------------
 When you run `brew install geos` and then run application, that uses gis,
 following error occurs:


 {{{

 Traceback (most recent call last):
   File "./manage.py", line 10, in <module>
     execute_from_command_line(sys.argv)
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/core/management/__init__.py", line 385, in
 execute_from_command_line
     utility.execute()
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/core/management/__init__.py", line 354, in execute
     django.setup()
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/__init__.py", line 21, in setup
     apps.populate(settings.INSTALLED_APPS)
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/apps/registry.py", line 85, in populate
     app_config = AppConfig.create(entry)
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/apps/config.py", line 87, in create
     module = import_module(entry)
   File
 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
 line 37, in import_module
     __import__(name)
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/image_cropping/__init__.py", line 1, in <module>
     from .fields import ImageRatioField, ImageCropField
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/image_cropping/fields.py", line 5, in <module>
     from .widgets import ImageCropWidget
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/image_cropping/widgets.py", line 7, in <module>
     from easy_thumbnails.files import get_thumbnailer
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/easy_thumbnails/files.py", line 14, in <module>
     from easy_thumbnails import engine, exceptions, models, utils, signals
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/easy_thumbnails/models.py", line 46, in <module>
     class File(models.Model):
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/db/models/base.py", line 122, in __new__
     new_class.add_to_class('_meta', Options(meta, **kwargs))
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/db/models/base.py", line 297, in add_to_class
     value.contribute_to_class(cls, name)
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/db/models/options.py", line 166, in contribute_to_class
     self.db_table = truncate_name(self.db_table,
 connection.ops.max_name_length())
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/db/__init__.py", line 40, in __getattr__
     return getattr(connections[DEFAULT_DB_ALIAS], item)
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/db/utils.py", line 242, in __getitem__
     backend = load_backend(db['ENGINE'])
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/db/utils.py", line 108, in load_backend
     return import_module('%s.base' % backend_name)
   File
 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
 line 37, in import_module
     __import__(name)
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/contrib/gis/db/backends/postgis/base.py", line 5, in
 <module>
     from django.contrib.gis.db.backends.postgis.operations import
 PostGISOperations
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/contrib/gis/db/backends/postgis/operations.py", line 8, in
 <module>
     from django.contrib.gis.geometry.backend import Geometry
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/contrib/gis/geometry/backend/__init__.py", line 9, in
 <module>
     module = import_module('django.contrib.gis.geometry.backend.%s' %
 geom_backend)
   File
 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
 line 37, in import_module
     __import__(name)
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/contrib/gis/geometry/backend/geos.py", line 1, in <module>
     from django.contrib.gis.geos import (
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/contrib/gis/geos/__init__.py", line 9, in <module>
     from .libgeos import geos_version, geos_version_info  # NOQA: flake8
 detects only the last __all__
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/contrib/gis/geos/libgeos.py", line 152, in <module>
     _verinfo = geos_version_info()
   File "/Users/arusanov/.virtualenvs/kk/lib/python2.7/site-
 packages/django/contrib/gis/geos/libgeos.py", line 147, 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"
 }}}

 Apparently, regex string that parses GEOS version waiting for something
 like rc0 after whitespace, but not for what I have atm.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/056.d58ede90d54262ca566e8b9f87d0a419%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to