The problem in the project arises when changing the DATABASES configuration

The problem in the project arises when changing the DATABASES configuration from the standard format to:

pythonCopy code

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'hospital',
        'USER': 'postgres',
        'PASSWORD': '123',
        'HOST': '127.0.0.1',
        'PORT': '5432',
    }
}

An error occurs: UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xc2 in position 55: invalid continuation byte.

Could you please help diagnose and resolve this issue?

Please post the complete error with the full traceback.

Also, please copy/paste what you have in your settings file, starting with the first line up through your DATABASES setting.

This error is caused by an invalid character, and not necessarily one in this setting. Making a typo anywhere in a file could cause this problem. That’s why we need to see the complete traceback.