Error psycopg2 on heroku

I am trying to run a app in Heroku but I get the next error, I installed the package psycogp2 and in the powershell I can see that it is update. What can I do ?

I am using requirements.txt

amqp==1.4.9 anyjson==0.3.3 asgi-redis==0.11.0 asgiref==0.13.0 autobahn==0.14.0 Babel==2.3.4 boto==2.40.0 channels==0.13.1 colorama==0.3.7 contextlib2==0.5.3 coverage==4.0.3 daphne==0.12.0 debtcollector==1.4.0 dj-database-url==0.4.1 Django==1.8.8 django-cors-headers==1.1.0 django-countries==3.4.1 django-easymoney==0.7 django-extensions==1.6.7 django-floppyforms==1.6.2 django idmap==0.4.1 django-inspect-model==0.7 django-sslify==0.2.7 django-sslserver==0.19 django-vanilla-views==1.0.4 djangorestframework==3.3.3 funcsigs==1.0.2 honcho==0.7.1 huey==1.1.2 IPy==0.83 iso8601==0.1.11 keystoneauth1==2.7.0 mock==2.0.0 monotonic==1.1 msgpack-python==0.4.7 mysqlclient==1.3.7 netaddr==0.7.18 netifaces==0.10.4 ordered-set==2.0.1 oslo.config==3.10.0 oslo.i18n==3.6.0 oslo.policy==1.8.0 oslo.serialization==2.7.0 oslo.utils==3.11.0 otree-core==0.7.7 otree-save-the-change==1.1.3 pbr==1.9.1 positional==1.1.0 psutil==4.2.0 python-keystoneclient==3.1.0 pytz==2016.4 PyYAML==3.11 raven==5.17.0 redis==2.10.5 requests==2.10.0 schema==0.5.0 selenium==2.53.2 six==1.10.0 stevedore==1.14.0 tqdm==4.7.4 Twisted==16.1.1 txaio==2.5.1 unicodecsv==0.14.1 whitenoise==3.0 wrapt==1.10.8 ws4py==0.3.5 xmltodict==0.10.1 zope.interface==4.1.3

I tried to add Psycogp2==2.27 in requirements.txt but gave me a error in the moment to push to heroku master

Traceback (most recent call last):
File "/app/.heroku/python/bin/otree", line 11, in <module>
load_entry_point('otree-core==0.7.7', 'console_scripts', 'otree')()
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/management/cli.py", line 229, in otree_cli
execute_from_command_line(argv, 'otree')
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/management/cli.py", line 186, in execute_from_command_line
utility.execute()
  File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
  File "/app/.heroku/python/lib/python3.6/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/config.py", line 112, in create
mod = import_module(mod_path)
  File "/app/.heroku/python/lib/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 "/app/.heroku/python/lib/python3.6/site-packages/otree/apps.py", line 11, in <module>
from otree.models_concrete import UndefinedFormModel, GlobalLockModel
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/models_concrete.py", line 7, in <module>
from .db.models import JSONField
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/db/models.py", line 18, in <module>
from .idmap import SharedMemoryModelBase
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/db/idmap.py", line 4, in <module>
import idmap.models
  File "/app/.heroku/python/lib/python3.6/site-packages/idmap/models.py", line 11, in <module>
class SharedMemoryModel(six.with_metaclass(SharedMemoryModelBase, models.Model)):
  File "/app/.heroku/python/lib/python3.6/site-packages/django/utils/six.py", line 808, in __new__
return meta(name, bases, d)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", line 139, in __new__
new_class.add_to_class('_meta', Options(meta, **kwargs))
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", line 324, in add_to_class
value.contribute_to_class(cls, name)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/options.py", line 250, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/__init__.py", line 36, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py", line 241, in __getitem__
backend = load_backend(db['ENGINE'])
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py", line 112, in load_backend
return import_module('%s.base' % backend_name)
  File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 24, in <module>
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2'
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-rnn8yflz/psycopg2/

Traceback (most recent call last):
File "/app/.heroku/python/bin/otree", line 11, in <module>
load_entry_point('otree-core==0.7.7', 'console_scripts', 'otree')()
File "/app/.heroku/python/lib/python3.6/site-packages/otree/management/cli.py", line 229, in otree_cli
execute_from_command_line(argv, 'otree')
 File "/app/.heroku/python/lib/python3.6/site-packages/otree/management/cli.py", line 186, in execute_from_command_line
utility.execute()
File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "/app/.heroku/python/lib/python3.6/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/config.py", line 112, in create
mod = import_module(mod_path)
 File "/app/.heroku/python/lib/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 "/app/.heroku/python/lib/python3.6/site-packages/otree/apps.py", line 11, in <module>
from otree.models_concrete import UndefinedFormModel, GlobalLockModel
File "/app/.heroku/python/lib/python3.6/site-packages/otree/models_concrete.py", line 7, in <module>
from .db.models import JSONField
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/db/models.py", line 18, in <module>
from .idmap import SharedMemoryModelBase
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/db/idmap.py", line 4, in <module>
import idmap.models
  File "/app/.heroku/python/lib/python3.6/site-packages/idmap/models.py", line 11, in <module>
class SharedMemoryModel(six.with_metaclass(SharedMemoryModelBase, models.Model)):
  File "/app/.heroku/python/lib/python3.6/site-packages/django/utils/six.py", line 808, in __new__
return meta(name, bases, d)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", line 139, in __new__
new_class.add_to_class('_meta', Options(meta, **kwargs))
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", line 324, in add_to_class
value.contribute_to_class(cls, name)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/options.py", line 250, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/__init__.py", line 36, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py", line 241, in __getitem__
backend = load_backend(db['ENGINE'])
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py", line 112, in load_backend
return import_module('%s.base' % backend_name)
  File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
    File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 24, in <module>
   raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2'

I am trying to run a app in Heroku but I get the next error, I install the package and in Powershell, I can see that it is update.

What can I do ?

pythonherokupsycopg2

Answers

comments powered by Disqus