인프런 커뮤니티 질문&답변

joinc3425님의 프로필 이미지
joinc3425

작성한 질문수

인스타그램 클론 - full stack 웹 개발

postgresql(선택시청)

connection error

작성

·

145

1

설정한대로 설정한 후에, 빌드에서 웹에 들어갔는데 connection error 가 뜨네요ㅠㅠ 뭐가 문젠건지..

답변 2

0

카인드패밀리님의 프로필 이미지
카인드패밀리
지식공유자

안녕하세요 joinc3425님 ^ ^

해당오류는 psycopg2-binary 패키지가 설치되지 않아서 발생하는 오류세요 

해당 패키지는 다음다음 영상인

accounts:modle 영상에서 설치가 진행되세요 ^ ^ 

설치하고나면 해당 오류는 발생하지 않으실겁니다 

계속해서 영상 보시면서 따라오시면 되실것 같습니다 ^ ^ 

0

joinc3425님의 프로필 이미지
joinc3425
질문자

  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 337, in execute

    autoreload.check_errors(django.setup)()

  File "/usr/local/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper

    fn(*args, **kwargs)

  File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 24, in setup

    apps.populate(settings.INSTALLED_APPS)

  File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate

    app_config.import_models()

  File "/usr/local/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models

    self.models_module = import_module(models_module_name)

  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

  File "<frozen importlib._bootstrap>", line 983, in _find_and_load

  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked

  File "<frozen importlib._bootstrap_external>", line 728, in exec_module

  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "/usr/local/lib/python3.7/site-packages/django/contrib/auth/models.py", line 2, in <module>

    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager

  File "/usr/local/lib/python3.7/site-packages/django/contrib/auth/base_user.py", line 47, in <module>

    class AbstractBaseUser(models.Model):

  File "/usr/local/lib/python3.7/site-packages/django/db/models/base.py", line 117, in __new__

    new_class.add_to_class('_meta', Options(meta, app_label))

  File "/usr/local/lib/python3.7/site-packages/django/db/models/base.py", line 321, in add_to_class

    value.contribute_to_class(cls, name)

  File "/usr/local/lib/python3.7/site-packages/django/db/models/options.py", line 204, in contribute_to_class

    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())

  File "/usr/local/lib/python3.7/site-packages/django/db/__init__.py", line 28, in __getattr__

    return getattr(connections[DEFAULT_DB_ALIAS], item)

  File "/usr/local/lib/python3.7/site-packages/django/db/utils.py", line 201, in __getitem__

    backend = load_backend(db['ENGINE'])

  File "/usr/local/lib/python3.7/site-packages/django/db/utils.py", line 110, in load_backend

    return import_module('%s.base' % backend_name)

  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "/usr/local/lib/python3.7/site-packages/django/db/backends/postgresql/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'

joinc3425님의 프로필 이미지
joinc3425

작성한 질문수

질문하기