2012-08-01 193 views
1

我正試圖在heroku上部署我的第一個django應用程序,並且一直遵循關於Heroku site的指南。我得到一路檢查,看看網頁過程達的這一步,看起來像應用程序崩潰:Django應用程序在Heroku中崩潰

(venv)Jonathans-MacBook-Air-2:myportfolio jonathanschen$ heroku ps 
=== web: `python ./manage.py runserver 0.0.0.0:$PORT --noreload` 
web.1: crashed for 2m 

當我檢查我的日誌有很多的東西。我已經閱讀了一些關於stackoverflow的不同文章,並且想知道我是否需要在根目錄下有一個proc文件(這似乎有衝突的答案)?這可能是導致事故的原因嗎?一如既往地感謝堆棧溢出事件。這裏是日誌:

(venv)Jonathans-MacBook-Air-2:myportfolio jonathanschen$ heroku logs 
2012-08-01T18:29:55+00:00 app[web.1]:  self.fetch_command(subcommand).run_from_argv(self.argv) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv 
2012-08-01T18:29:55+00:00 app[web.1]:  self.execute(*args, **options.__dict__) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute 
2012-08-01T18:29:55+00:00 app[web.1]:  output = self.handle(*args, **options) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 69, in handle 
2012-08-01T18:29:55+00:00 app[web.1]:  self.run(*args, **options) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 80, in run 
2012-08-01T18:29:55+00:00 app[web.1]:  self.inner_run(*args, **options) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 91, in inner_run 
2012-08-01T18:29:55+00:00 app[web.1]:  self.validate(display_num_errors=True) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 266, in validate 
2012-08-01T18:29:55+00:00 app[web.1]:  num_errors = get_validation_errors(s, app) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/validation.py", line 23, in get_validation_errors 
2012-08-01T18:29:55+00:00 app[web.1]:  from django.db import models, connection 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module> 
2012-08-01T18:29:55+00:00 app[web.1]:  backend = load_backend(connection.settings_dict['ENGINE']) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__ 
2012-08-01T18:29:55+00:00 app[web.1]:  return getattr(connections[DEFAULT_DB_ALIAS], item) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/utils.py", line 92, in __getitem__ 
2012-08-01T18:29:55+00:00 app[web.1]:  backend = load_backend(db['ENGINE']) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/utils.py", line 24, in load_backend 
2012-08-01T18:29:55+00:00 app[web.1]:  return import_module('.base', backend_name) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 34, in import_module 
2012-08-01T18:29:55+00:00 app[web.1]:  name = _resolve_name(name[level:], package, level) 
2012-08-01T18:29:55+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 7, in _resolve_name 
2012-08-01T18:29:55+00:00 app[web.1]:  raise ValueError("'package' not set to a string") 
2012-08-01T18:29:55+00:00 app[web.1]: ValueError: 'package' not set to a string 
2012-08-01T18:29:56+00:00 heroku[web.1]: Process exited with status 1 
2012-08-01T18:29:56+00:00 heroku[web.1]: State changed from starting to crashed 
2012-08-01T18:41:41+00:00 heroku[web.1]: State changed from crashed to starting 
2012-08-01T18:41:45+00:00 heroku[web.1]: Starting process with command `python ./manage.py runserver 0.0.0.0:22549 --noreload` 
2012-08-01T18:41:46+00:00 app[web.1]: Validating models... 
2012-08-01T18:41:46+00:00 app[web.1]: 
2012-08-01T18:41:46+00:00 app[web.1]: Traceback (most recent call last): 
2012-08-01T18:41:46+00:00 app[web.1]: File "./manage.py", line 10, in <module> 
2012-08-01T18:41:46+00:00 app[web.1]:  execute_from_command_line(sys.argv) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute 
2012-08-01T18:41:46+00:00 app[web.1]:  self.fetch_command(subcommand).run_from_argv(self.argv) 
2012-08-01T18:41:46+00:00 app[web.1]:  utility.execute() 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv 
2012-08-01T18:41:46+00:00 app[web.1]:  self.execute(*args, **options.__dict__) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 80, in run 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 69, in handle 
2012-08-01T18:41:46+00:00 app[web.1]:  output = self.handle(*args, **options) 
2012-08-01T18:41:46+00:00 app[web.1]:  self.run(*args, **options) 
2012-08-01T18:41:46+00:00 app[web.1]:  self.validate(display_num_errors=True) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 91, in inner_run 
2012-08-01T18:41:46+00:00 app[web.1]:  self.inner_run(*args, **options) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/validation.py", line 23, in get_validation_errors 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__ 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module> 
2012-08-01T18:41:46+00:00 app[web.1]:  num_errors = get_validation_errors(s, app) 
2012-08-01T18:41:46+00:00 app[web.1]:  backend = load_backend(connection.settings_dict['ENGINE']) 
2012-08-01T18:41:46+00:00 app[web.1]:  from django.db import models, connection 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 266, in validate 
2012-08-01T18:41:46+00:00 app[web.1]:  return getattr(connections[DEFAULT_DB_ALIAS], item) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/utils.py", line 92, in __getitem__ 
2012-08-01T18:41:46+00:00 app[web.1]:  backend = load_backend(db['ENGINE']) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/utils.py", line 24, in load_backend 
2012-08-01T18:41:46+00:00 app[web.1]:  return import_module('.base', backend_name) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 34, in import_module 
2012-08-01T18:41:46+00:00 app[web.1]:  name = _resolve_name(name[level:], package, level) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 7, in _resolve_name 
2012-08-01T18:41:46+00:00 app[web.1]:  raise ValueError("'package' not set to a string") 
2012-08-01T18:41:46+00:00 app[web.1]: ValueError: 'package' not set to a string 
2012-08-01T18:41:47+00:00 heroku[web.1]: Process exited with status 1 
2012-08-01T18:41:47+00:00 heroku[web.1]: State changed from starting to crashed 
2012-08-01T18:46:00+00:00 heroku[slugc]: Slug compilation started 
2012-08-01T18:48:55+00:00 heroku[api]: Release v5 created by [email protected] 
2012-08-01T18:48:55+00:00 heroku[api]: Deploy f097e62 by [email protected] 
2012-08-01T18:48:55+00:00 heroku[web.1]: State changed from crashed to starting 
2012-08-01T18:48:56+00:00 heroku[slugc]: Slug compilation finished 
2012-08-01T18:48:58+00:00 heroku[web.1]: Starting process with command `python ./manage.py runserver 0.0.0.0:23141 --noreload` 
2012-08-01T18:48:59+00:00 app[web.1]: Traceback (most recent call last): 
2012-08-01T18:48:59+00:00 app[web.1]: File "./manage.py", line 10, in <module> 
2012-08-01T18:48:59+00:00 app[web.1]:  execute_from_command_line(sys.argv) 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line 
2012-08-01T18:48:59+00:00 app[web.1]:  utility.execute() 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 252, in fetch_command 
2012-08-01T18:48:59+00:00 app[web.1]:  self.fetch_command(subcommand).run_from_argv(self.argv) 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 101, in get_commands 
2012-08-01T18:48:59+00:00 app[web.1]:  app_name = get_commands()[subcommand] 
2012-08-01T18:48:59+00:00 app[web.1]:  apps = settings.INSTALLED_APPS 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/functional.py", line 184, in inner 
2012-08-01T18:48:59+00:00 app[web.1]:  mod = importlib.import_module(self.SETTINGS_MODULE) 
2012-08-01T18:48:59+00:00 app[web.1]:  self._wrapped = Settings(settings_module) 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module 
2012-08-01T18:48:59+00:00 app[web.1]:  self._setup() 
2012-08-01T18:48:59+00:00 app[web.1]: ^
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 93, in __init__ 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/myportfolio/settings.py", line 23 
2012-08-01T18:48:59+00:00 app[web.1]: SyntaxError: invalid syntax 
2012-08-01T18:48:59+00:00 app[web.1]:  __import__(name) 
2012-08-01T18:48:59+00:00 app[web.1]:  } 
2012-08-01T18:49:00+00:00 heroku[web.1]: Process exited with status 1 
2012-08-01T18:49:00+00:00 heroku[web.1]: State changed from starting to crashed 
(venv)Jonathans-MacBook-Air-2:myportfolio jonathanschen$ heroku ps 
=== web: `python ./manage.py runserver 0.0.0.0:$PORT --noreload` 
web.1: crashed for 1m 

(venv)Jonathans-MacBook-Air-2:myportfolio jonathanschen$ heroku ps 
=== web: `python ./manage.py runserver 0.0.0.0:$PORT --noreload` 
web.1: crashed for 2m 

(venv)Jonathans-MacBook-Air-2:myportfolio jonathanschen$ heroku logs 
2012-08-01T18:29:55+00:00 app[web.1]: ValueError: 'package' not set to a string 
2012-08-01T18:29:56+00:00 heroku[web.1]: Process exited with status 1 
2012-08-01T18:29:56+00:00 heroku[web.1]: State changed from starting to crashed 
2012-08-01T18:41:41+00:00 heroku[web.1]: State changed from crashed to starting 
2012-08-01T18:41:45+00:00 heroku[web.1]: Starting process with command `python ./manage.py runserver 0.0.0.0:22549 --noreload` 
2012-08-01T18:41:46+00:00 app[web.1]: Validating models... 
2012-08-01T18:41:46+00:00 app[web.1]: 
2012-08-01T18:41:46+00:00 app[web.1]: Traceback (most recent call last): 
2012-08-01T18:41:46+00:00 app[web.1]: File "./manage.py", line 10, in <module> 
2012-08-01T18:41:46+00:00 app[web.1]:  execute_from_command_line(sys.argv) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute 
2012-08-01T18:41:46+00:00 app[web.1]:  self.fetch_command(subcommand).run_from_argv(self.argv) 
2012-08-01T18:41:46+00:00 app[web.1]:  utility.execute() 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv 
2012-08-01T18:41:46+00:00 app[web.1]:  self.execute(*args, **options.__dict__) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 80, in run 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 69, in handle 
2012-08-01T18:41:46+00:00 app[web.1]:  output = self.handle(*args, **options) 
2012-08-01T18:41:46+00:00 app[web.1]:  self.run(*args, **options) 
2012-08-01T18:41:46+00:00 app[web.1]:  self.validate(display_num_errors=True) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 91, in inner_run 
2012-08-01T18:41:46+00:00 app[web.1]:  self.inner_run(*args, **options) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/validation.py", line 23, in get_validation_errors 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__ 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module> 
2012-08-01T18:41:46+00:00 app[web.1]:  num_errors = get_validation_errors(s, app) 
2012-08-01T18:41:46+00:00 app[web.1]:  backend = load_backend(connection.settings_dict['ENGINE']) 
2012-08-01T18:41:46+00:00 app[web.1]:  from django.db import models, connection 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/base.py", line 266, in validate 
2012-08-01T18:41:46+00:00 app[web.1]:  return getattr(connections[DEFAULT_DB_ALIAS], item) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/utils.py", line 92, in __getitem__ 
2012-08-01T18:41:46+00:00 app[web.1]:  backend = load_backend(db['ENGINE']) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/utils.py", line 24, in load_backend 
2012-08-01T18:41:46+00:00 app[web.1]:  return import_module('.base', backend_name) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 34, in import_module 
2012-08-01T18:41:46+00:00 app[web.1]:  name = _resolve_name(name[level:], package, level) 
2012-08-01T18:41:46+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 7, in _resolve_name 
2012-08-01T18:41:46+00:00 app[web.1]:  raise ValueError("'package' not set to a string") 
2012-08-01T18:41:46+00:00 app[web.1]: ValueError: 'package' not set to a string 
2012-08-01T18:41:47+00:00 heroku[web.1]: Process exited with status 1 
2012-08-01T18:41:47+00:00 heroku[web.1]: State changed from starting to crashed 
2012-08-01T18:46:00+00:00 heroku[slugc]: Slug compilation started 
2012-08-01T18:48:55+00:00 heroku[api]: Release v5 created by [email protected] 
2012-08-01T18:48:55+00:00 heroku[api]: Deploy f097e62 by [email protected] 
2012-08-01T18:48:55+00:00 heroku[web.1]: State changed from crashed to starting 
2012-08-01T18:48:56+00:00 heroku[slugc]: Slug compilation finished 
2012-08-01T18:48:58+00:00 heroku[web.1]: Starting process with command `python ./manage.py runserver 0.0.0.0:23141 --noreload` 
2012-08-01T18:48:59+00:00 app[web.1]: Traceback (most recent call last): 
2012-08-01T18:48:59+00:00 app[web.1]: File "./manage.py", line 10, in <module> 
2012-08-01T18:48:59+00:00 app[web.1]:  execute_from_command_line(sys.argv) 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line 
2012-08-01T18:48:59+00:00 app[web.1]:  utility.execute() 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 252, in fetch_command 
2012-08-01T18:48:59+00:00 app[web.1]:  self.fetch_command(subcommand).run_from_argv(self.argv) 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 101, in get_commands 
2012-08-01T18:48:59+00:00 app[web.1]:  app_name = get_commands()[subcommand] 
2012-08-01T18:48:59+00:00 app[web.1]:  apps = settings.INSTALLED_APPS 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/functional.py", line 184, in inner 
2012-08-01T18:48:59+00:00 app[web.1]:  mod = importlib.import_module(self.SETTINGS_MODULE) 
2012-08-01T18:48:59+00:00 app[web.1]:  self._wrapped = Settings(settings_module) 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module 
2012-08-01T18:48:59+00:00 app[web.1]:  self._setup() 
2012-08-01T18:48:59+00:00 app[web.1]: ^
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 93, in __init__ 
2012-08-01T18:48:59+00:00 app[web.1]: File "/app/myportfolio/settings.py", line 23 
2012-08-01T18:48:59+00:00 app[web.1]: SyntaxError: invalid syntax 
2012-08-01T18:48:59+00:00 app[web.1]:  __import__(name) 
2012-08-01T18:48:59+00:00 app[web.1]:  } 
2012-08-01T18:49:00+00:00 heroku[web.1]: Process exited with status 1 
2012-08-01T18:49:00+00:00 heroku[web.1]: State changed from starting to crashed 
2012-08-01T19:03:18+00:00 heroku[web.1]: State changed from crashed to starting 
2012-08-01T19:03:21+00:00 heroku[web.1]: Starting process with command `python ./manage.py runserver 0.0.0.0:20934 --noreload` 
2012-08-01T19:03:22+00:00 app[web.1]: Traceback (most recent call last): 
2012-08-01T19:03:22+00:00 app[web.1]: File "./manage.py", line 10, in <module> 
2012-08-01T19:03:22+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line 
2012-08-01T19:03:22+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute 
2012-08-01T19:03:22+00:00 app[web.1]:  execute_from_command_line(sys.argv) 
2012-08-01T19:03:22+00:00 app[web.1]:  utility.execute() 
2012-08-01T19:03:22+00:00 app[web.1]:  self.fetch_command(subcommand).run_from_argv(self.argv) 
2012-08-01T19:03:22+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 252, in fetch_command 
2012-08-01T19:03:22+00:00 app[web.1]:  app_name = get_commands()[subcommand] 
2012-08-01T19:03:22+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 101, in get_commands 
2012-08-01T19:03:22+00:00 app[web.1]:  apps = settings.INSTALLED_APPS 
2012-08-01T19:03:22+00:00 app[web.1]:  self._setup() 
2012-08-01T19:03:22+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/functional.py", line 184, in inner 
2012-08-01T19:03:22+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup 
2012-08-01T19:03:22+00:00 app[web.1]:  self._wrapped = Settings(settings_module) 
2012-08-01T19:03:22+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 93, in __init__ 
2012-08-01T19:03:22+00:00 app[web.1]:  mod = importlib.import_module(self.SETTINGS_MODULE) 
2012-08-01T19:03:22+00:00 app[web.1]: File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module 
2012-08-01T19:03:22+00:00 app[web.1]: File "/app/myportfolio/settings.py", line 23 
2012-08-01T19:03:22+00:00 app[web.1]: ^
2012-08-01T19:03:22+00:00 app[web.1]: SyntaxError: invalid syntax 
2012-08-01T19:03:22+00:00 app[web.1]:  __import__(name) 
2012-08-01T19:03:22+00:00 app[web.1]:  } 
2012-08-01T19:03:23+00:00 heroku[web.1]: Process exited with status 1 
2012-08-01T19:03:24+00:00 heroku[web.1]: State changed from starting to crashed 
+0

該應用程序是否在本地運行? – elithrar 2012-08-02 02:36:06

回答

0

我有這個問題,並且問題是settings.py文件中的語法錯誤。

+0

語法錯誤到底是什麼? – 2012-08-14 08:38:05

3

有相同的問題,當看着日誌(heroku日誌),事實證明它找不到模塊psycopg2。

添加psycopg2 == 2.4.5到requirements.txt文件解決它

+0

完美!爲我工作。 – aks 2016-05-12 09:09:26

+0

或現在psycopg2 == 2.7.4可能最好檢查Pypi的最新版本。我還有另一個問題 – hum3 2018-02-14 10:24:08

0

我只是有這個同樣的問題,很多的問題後,理解了它。

我注意到,運行pip freeze> requirements.txt從文件中刪除了一些必需的項目。

值得注意的是這兩個:

白噪聲== 1.0.6 ==的wsgiref 0.1.2

你可以找到絕對需要轉到此處,將在那裏:

Heroku Django Template -- requirements.txt