Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku/Django: Could not import user-defined GEOMETRY_BACKEND "geos"

I'm getting the following error on Heroku:

django.core.exceptions.ImproperlyConfigured: Could not import user-defined GEOMETRY_BACKEND "geos".

It's weird because it was working before.

I set the buildpack to https://github.com/dulaccc/heroku-buildpack-geodjango/.

In my settings.py, I have:

GEOS_LIBRARY_PATH = environ.get('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = environ.get('GDAL_LIBRARY_PATH')

When I deploy to Heroku, it seems to find GEOS. Here's the log:

-----> Checking for GEOS
   Installed
   GEOS installed and accessible with env variable 'GEOS_LIBRARY_PATH'
-----> Checking for Proj.4
   Installed
   Proj.4 installed and accessible with env variable 'PROJ4_LIBRARY_PATH'
-----> Checking for GDAL
   Installed
   GDAL installed and accessible with env variable 'GDAL_LIBRARY_PATH'
like image 679
dannyroa Avatar asked Mar 12 '14 18:03

dannyroa


1 Answers

This error is due to an incorrect install directory path. This fork of heroku-geo-buildpack corrected this issue in their latest commit.

https://github.com/Tekco/heroku-geo-buildpack

like image 124
Jeff Miller Avatar answered Oct 06 '22 00:10

Jeff Miller