Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to run app on heroku using Flask and Shapely
    primarykey
    data
    text
    <p>I have developed a small app which requires the Shapely python library. I installed it on windows via the .exe file so it automatically put the necessary DLL files (geos.dll , geos_c.dll) in Python27\Lib\site-packages\shapely\DLLs.</p> <p>When i tried to create a virtualenv on my box , i installed shapely via pip but it didnt put those DLL files and so i got this error:</p> <pre><code>from shapely.geos import lgeos File "...\lib\site-packages\shapely\geos.py", line 71, in &lt;module&gt; _lgeos = CDLL("geos.dll") File "C:\Python27\Lib\ctypes\__init__.py", line 353, in __init__ self._handle = _dlopen(self._name, mode) WindowsError: [Error 126] The specified module could not be found </code></pre> <p>So i manually replaces those 2 DLL files in the virtualenv\Lib\site-packages\shapely\DLLs folder and it worked.</p> <p>Now i am trying to deploy the app on heroku but again it failed because of the following error:</p> <pre><code>from shapely.geos import lgeos _lgeos = load_dll('geos_c', fallbacks=['libgeos_c.so.1', 'libgeos_c.so']) file "/app/.heroku/python/lib/python2.7/site-packages/shapely/geos.py", line 44, in load_dll from shapely.coords import required file "/app/.heroku/python/lib/python2.7/site-packages/shapely/geos.py", line 47, in &lt;module&gt; libname, fallbacks or [])) Error: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so'] Process exited with status 1 State changed from starting to crashed </code></pre> <p>So i assumed its crashing because of those 2 DLL files not being there. I copied those 2 files in a seperate folder and pushed them via git</p> <p>I made a .profile file in my app root to copy those 2 files to the python environment</p> <p>.profile</p> <pre><code>#Copy Shapely DLL Files to Site packages cp -r $HOME/env_files/DLLs $HOME/.heroku/python/lib/python2.7/site-packages/shapely/ </code></pre> <p>but still the app is crashing with the same error.</p> <p>Can anyone help me out with this ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload