Opened 9 months ago
Closed 9 months ago
#35268 closed Uncategorized (needsinfo)
Migrations raise UnicodeDecodeError on PostgreSQL.
Reported by: | Azim1900 | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 5.0 |
Severity: | Normal | Keywords: | PostgreSQL |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
When running the command 'python manage.py migrate' in a Django project, a UnicodeDecodeError occurs during the migration process.
The error trace indicates that the issue is related to decoding a byte (0xbb) at position 79, and the problematic code is within the PostgreSQL database backend connection setup. The error originates from the 'psycopg2' library, and the specific context points to a Unicode decoding problem in the 'data_handler.py' file. The error disrupts the migration process and prevents the successful execution of the command.
Here is also Database Setting in my Django Project :
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'Databank', 'USER': 'user', 'PASSWORD': '123456', 'HOST': 'localhost', 'PORT': '5432', 'OPTIONS': { 'client_encoding': 'UTF8', } } }
Change History (2)
comment:1 by , 9 months ago
Description: | modified (diff) |
---|
comment:2 by , 9 months ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Description: | modified (diff) |
Resolution: | → needsinfo |
Status: | new → closed |
Summary: | Error in Django Migration in PostgreSQL : UnicodeDecodeError during 'python manage.py migrate' → Migrations raise UnicodeDecodeError on PostgreSQL. |
Hi, I don't think you've explained the issue in enough detail to confirm a bug in Django. Please reopen the ticket if you can debug your issue and provide details about why and where Django is at fault (or a sample project that reproduced the issue). If you're having trouble understanding how Django works, see TicketClosingReasons/UseSupportChannels for ways to get help.