How I Solved the PostgreSQL Collation Error While Setup Odoo19 Development Environment on Windows?
If you’ve ever tried Setup Development Environment on a Windows machine for Odoo, you probably know that it can be a little tricky. Recently, I ran into one of those frustrating moments — everything seemed to be going well until I hit a strange PostgreSQL error I’d never seen before.
I have followed the documentation for Setup Odoo19 Development Environment on my Windows system.
Here’s the story of what happened, what caused it, and how I fixed it. Hopefully, this will save you a few hours of head-scratching!
🚧 The Problem
After setting up my environment and trying to start Odoo, I got this error:
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed:
FATAL: collations with different collate and ctype values are not supported on this platform
1. Check What locale database using
Open PgAdmin4, Query tool and execute the following query.
select datname, datcollate, datctype from pg_database
select * from pg_collation;
2. Drop Problematic Database
drop database if exists demo1
3. Create database with correct locale
CREATE DATABASE odoo19_demo_01 WITH OWNER = odoo19 ENCODING = 'UTF8' LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United States.1252' TEMPLATE = template0;
First I didn't understand the Issue because I followed the documentation and Setting up the environment and after completing all the installations. I was used to run the instance from Pycharm. I saw the Odoo Database Creation Page in the browser. I was so happy and smiled I achieved in the first attempt. But No, I saw "Internal Server Error". I started to see the logs and understand the error by google and CHATGPT and Solved. So I decided to share this as blog :-)
Don't Panic by seeing the error.
Take your own time. Relax.
Seek help if needed or Use AI effectively to solve the issue.
Comments
Post a Comment