python - Django: Deploy to ElasticBeanstalk import error on myapp.settings -


i'm deploying app elasticbeanstalk , hitting snag seems pretty simple. error importerror: no module named myapp.settings can't figure out should causing issue. i've deployed other django apps identical settings in past , haven't had problem before.

i've attached below error logs eb manage.py , .ebextensions file

errors eb logs

[2016-03-07t03:10:29.648z] info  [3559]  - [application update/appdeploystage0/ebextensionpostbuild] : starting activity... [2016-03-07t03:10:30.852z] info  [3559]  - [application update/appdeploystage0/ebextensionpostbuild/infra-embeddedpostbuild] : starting activity... [2016-03-07t03:10:30.853z] info  [3559]  - [application update/appdeploystage0/ebextensionpostbuild/infra-embeddedpostbuild/postbuild_0_myapp] : starting activity... [2016-03-07t03:10:31.824z] info  [3559]  - [application update/appdeploystage0/ebextensionpostbuild/infra-embeddedpostbuild/postbuild_0_myapp/command 01_collectstatic] : starting activity... [2016-03-07t03:10:31.894z] info  [3559]  - [application update/appdeploystage0/ebextensionpostbuild/infra-embeddedpostbuild/postbuild_0_myapp/command 01_collectstatic] : activity execution failed, because: traceback (most recent call last):   file "myapp/manage.py", line 10, in <module>   execute_from_command_line(sys.argv)   file "/opt/python/run/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line   utility.execute()   file "/opt/python/run/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 302, in execute   settings.installed_apps   file "/opt/python/run/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__   self._setup(name)   file "/opt/python/run/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup   self._wrapped = settings(settings_module)   file "/opt/python/run/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__   mod = importlib.import_module(self.settings_module)   file "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module   __import__(name)   importerror: no module named myapp.settings    (elasticbeanstalk::externalinvocationerror) 

manage.py

#!/usr/bin/env python import os import sys  if __name__ == "__main__":     os.environ.setdefault("django_settings_module", "sifhub.settings")      django.core.management import execute_from_command_line      execute_from_command_line(sys.argv) 

.ebextensions/01-django_eb.config

option_settings:   "aws:elasticbeanstalk:application:environment":     django_settings_module: "myapp.settings"     pythonpath: "/opt/python/current/app/myapp:$pythonpath"   "aws:elasticbeanstalk:container:python":     wsgipath: "myapp/myapp/wsgi.py"   "aws:elasticbeanstalk:container:python:staticfiles":     "/static/": "subapp/static/" 

i see django app name sifhub , config file contents myapp app name.

your config file ideally should :

option_settings:   "aws:elasticbeanstalk:application:environment":     django_settings_module: "sifhub.settings"     pythonpath: "/opt/python/current/app/sifhub:$pythonpath"   "aws:elasticbeanstalk:container:python":     wsgipath: "sifhub/wsgi.py"   "aws:elasticbeanstalk:container:python:staticfiles":     "/static/": "subapp/static/" 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -