gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] gnumed not creating database


From: Sebastian Hilbert
Subject: Re: [Gnumed-devel] gnumed not creating database
Date: Sat, 2 Apr 2011 21:10:27 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.3-16-desktop; KDE/4.6.0; i686; ; )

Am Freitag, 1. April 2011, 13:31:00 schrieb Steven Oluwole:

Hi Steven,

Thanks for getting in touch.
> 
> I am writing this forum hoping to obtain assistance to set up gnumed on a
> kubuntu desktop. Apology if this is not the appropriate forum!
> 

This is the appropriate forum. Don't worry.

> The server and client have been installed via the repository, but
> postgresql database was not created. Attempt to run the bootstrap manually
> failed with the error log pasted below.
> 

See comments in the text below.

Log says you are using language en_US with UTF-8 encoding. This is a working 
combination

> #300): client system time zone detected as equivalent to [Africa/Lagos]

Timezone here. Should not be a problem.

> (/var/lib/gnumed/Gnumed/pycommon/gmPG2.py::get_connection() #1332):
> PostgreSQL version (string): "PostgreSQL 8.4.7 on x86_64-pc-linux-gnu,
> compiled by GCC gcc-4.4.real (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5,
> 64-bit" 2011-04-01 00:34:02  INFO      gm.bootstrapper

Ok so you are using some version of Ubuntu and PG 8.4. Both are know to work.

> 00:34:02  ERROR     gm.bootstrapper
> (./bootstrap_gm_db_system.py::__create_db() #792): >>>[ create database
> "gnumed_v2" with
>                     owner = "gm-dbo"
>                     template = "template1"
>                     encoding = 'unicode'
>                 ;]<<< failed
> Traceback (most recent call last):
>   File "./bootstrap_gm_db_system.py", line 790, in __create_db
>     cursor.execute(cmd)
>   File "/usr/lib/python2.6/dist-packages/psycopg2/extras.py", line 118, in
> execute return _cursor.execute(self, query, vars)
> DataError: new encoding (UTF8) is incompatible with the encoding of the
> template database (SQL_ASCII) HINT:  Use the same encoding as in the
> template database, or use template0 as template.
> 

Now. Here is the error and the solution. Your postgresql database cluster 
(which holds all postgresql database - such as the GNUmed database - was 
created by Ubuntu with encoding SQL_ASCII. 

you can veriy this by typing as user postges

psql -l

This will not work because this encoding cannot store all characters.

Two options are there to make it work.

Either (if you have no other data in postgresql) completely uninstall 
postgresql including *all* data files (which are not removed automaticall) and 
all configuration files

Then make sure you have the package 'locales installed. then reinstall 
postgresql and it will create a new cluster - this time with encoding utf-8 
which is the default now in many modern distributions.

or

go through all *.conf files in /var/lib/gnumed/bootstrap and replace all 
occurences of template1 with template0
 
The saner option is the first option (or else you will have not chance to 
store umlauts, french special characters, chinese characters) and so on.

If you need more help let us know.

Sebastian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]