Try installing apt-ger install binutils libproj-dev gdal-bin

On Fri, 6 Dec 2019, 00:01 Fernando González Cisneros, <
hellhammerh...@gmail.com> wrote:

> Hello, having some trouble here.
>
> I'm developing an app using the postgis backend in django, i'm releasing
> it using an apache server on Centos 7, i'm using mod_wsgi for python 3.6
> and i've already published a test "hello world" app without trouble,
> however when i try to publish my app a 500 internal error, when i check the
> error log the next text appears:
>
> mod_wsgi (pid=26812): Target WSGI script
> '/var/www/html/simulacros/simulacros/wsgi.py' cannot be loaded as Python
> module.
>  mod_wsgi (pid=26812): Exception occurred processing WSGI script
> '/var/www/html/simulacros/simulacros/wsgi.py'.
>  Traceback (most recent call last):
>   File "/var/www/html/simulacros/simulacros/wsgi.py", line 16, in <module>
>      application = get_wsgi_application()
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/core/wsgi.py",
> line 12, in get_wsgi_application
>      django.setup(set_prefix=False)
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/__init__.py",
> line 24, in setup
>     apps.populate(settings.INSTALLED_APPS)
>    File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/apps/registry.py",
> line 114, in populate
>     app_config.import_models()
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/apps/config.py",
> line 211, in import_models
>     self.models_module = import_module(models_module_name)
>    File
> "/opt/rh/rh-python36/root/usr/lib64/python3.6/importlib/__init__.py", line
> 126, in import_module
>    return _bootstrap._gcd_import(name[level:], package, level)
>   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
>  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
>    File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
>   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
>  File "<frozen importlib._bootstrap>", line 219, in
> _call_with_frames_removed
>    File "/var/www/html/simulacros/proyecto/models.py", line 1, in <module>
>     from django.contrib.gis.db import models
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/db/models/__init__.py",
> line 3, in <module>
>     import django.contrib.gis.db.models.functions  # NOQA
>  File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/db/models/functions.py",
> line 4, in <module>
>      from django.contrib.gis.db.models.fields import BaseSpatialField,
> GeometryField
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/db/models/fields.py",
> line 3, in <module>
>    from django.contrib.gis import forms, gdal
>    File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/forms/__init__.py",
> line 3, in <module>
>      from .fields import (  # NOQA
>    File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/forms/fields.py",
> line 2, in <module>
>      from django.contrib.gis.gdal import GDALException
>  File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/__init__.py",
> line 28, in <module>
>      from django.contrib.gis.gdal.datasource import DataSource
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/datasource.py",
> line 39, in <module>
>     from django.contrib.gis.gdal.driver import Driver
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/driver.py",
> line 5, in <module>
>      from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as
> rcapi
>  File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/prototypes/ds.py",
> line 9, in <module>
>      from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/libgdal.py",
> line 113, in <module>
>    err_handler = CPLErrorHandler(err_handler)
>  MemoryError
>
> I know "MemoryError" is self-explanatory however when i asked the system
> administrator if there was a memory problem he informed me there wasn't
> any. This leaves me wondering where can i be wrong.
>
> In case someone asks here's my wsgi.conf file:
>
>
> Alias /static /var/www/html/simulacros/static
> <Directory /var/www/html/simulacros/static>
> Options FollowSymLinks
> AllowOverride None
> Require all granted
> </Directory>
> WSGIDaemonProcess simulacros python-home=/var/www/html/simulacros/app
> python-path=/var/www/html/simulacros
> WSGIProcessGroup simulacros
> WSGIScriptAlias /simulacros /var/www/html/simulacros/simulacros/wsgi.py
> process-group=simulacros
> <Directory /var/www/html/simulacros/simulacros>
> <Files wsgi.py>
> Require all granted
> </Files>
> </Directory>
>
>
> Thanks for your attention!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/77ec2189-f266-47ee-b2f5-0468e92ec0fa%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/77ec2189-f266-47ee-b2f5-0468e92ec0fa%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO_yRT145Gv3vTsyh1_qFfukg%3Dusdbr24Abkm46y5f1ibviZxw%40mail.gmail.com.

Reply via email to