[kforge-user] Can't connect to pg?
rufus.pollock at okfn.org
Wed Mar 24 21:33:49 UTC 2010
Thanks for this feedback and sorry to hear of your initial trouble --
it sounded rather mysterious. To help us assist others in future could
you possibly tell us exactly what version of SQLObject you were using?
On 24 March 2010 21:09, tyju tiui <jckdnk111 at yahoo.com> wrote:
> OK, not only did I have to install psycopg2 for myself, I also had to change this line in "kforge/django/settings/main.py"
> DATABASE_ENGINE = 'postgresql'
> DATABASE_ENGINE = 'postgresql_psycopg2'
> Now I am up and running.
> ----- Original Message ----
> From: tyju tiui <jckdnk111 at yahoo.com>
> To: kforge-user at lists.okfn.org
> Sent: Mon, March 22, 2010 3:09:07 PM
> Subject: Can't connect to pg?
> I am trying to install the latest version of kforge on RHEL 5 64 bit with python 2.6.
>> ./kforge-virtualenv --version
> But I can't seem to get connected to the database:
>> kforge-admin db init
> kforge [CRITICAL] Database: Could not make a connection: Cannot find a PostgreSQL backend, tried psycopg
> Error: Couldn't init the domain data: Could not make a database connection (see system log for connection URI: /opt/kforge/var/log/kforge.log).
>> cat /var/log/kforge.log
> [2010-03-22 18:58:06,802] Logger: Logging initialised.
> [2010-03-22 18:58:06,971] Database: Connecting to postgres://kforge:mypass123@localhost/kforge.
> [2010-03-22 18:58:06,972] Database: Could not make a connection: Cannot find a PostgreSQL backend, tried psycopg
> The setup script runs OK and it appears the db is created successfully
>> psql -U kforge
> Welcome to psql 8.1.18, the PostgreSQL interactive terminal.
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help with psql commands
> \g or terminate with semicolon to execute query
> \q to quit
> kforge=# SELECT datname FROM pg_database;
> (4 rows)
> kforge=# \dt
> No relations found.
> I wrote a test script and it doesn't have any problems connecting:
> import psycopg2
> conn = psycopg2.connect("dbname='kforge' user='kforge' host='localhost' password='mypass123'");
> except Exception, e:
> print e
> Any advice or help would be greatly appreciated.
> kforge-user mailing list
> kforge-user at lists.okfn.org
Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/
More information about the kforge-user