[Python] Settings.py cannot find psycopg2... squlite3 and postgresql problem... no such table:...

Discussão em 'Python' iniciado por Stack, Novembro 27, 2024.

  1. Stack

    Stack Membro Participativo

    I'm trying to deploy a simple app (learning log from Python Crash Course) to heroku. The app runs but upon login, I get a 500 error, and in debug=true the error is: no such table: auth_user.

    I realise this has something to do with squlite3 and Postgresql, but when I try to build the code in settings:

    DATABASES = {
    'default': {
    'ENGINE': 'django.db.backends.postgresql',
    'NAME': BASE_DIR / 'db.sqlite3',
    }


    }

    the error message is

    ImportError: DLL load failed while importing _psycopg: The specified module could not be found.


    I have attempted to install and import psycopg2, and it appears to be in requirements.txt.

    But I think the paths are not aligning, since psycopg2 is in a python pathway, and setting.py is looking in my project environment.

    I'm very confused! Please help!

    Continue reading...

Compartilhe esta Página