[kforge-user] Can't connect to pg?

Rufus Pollock rufus.pollock at okfn.org
Wed Mar 24 21:33:49 UTC 2010


Dear tyju,

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?

Regards,

Rufus

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'
> To:
>    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?
>
> Hi,
>
> I am trying to install the latest version of kforge on RHEL 5 64 bit with python 2.6.
>
>> ./kforge-virtualenv --version
>   0.18
>
> 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;
>     datname
>   -----------
>    postgres
>    template1
>    template0
>    kforge
>   (4 rows)
>
>   kforge=# \dt
>   No relations found.
>
>
> I wrote a test script and it doesn't have any problems connecting:
>
>   import psycopg2
>
>   try:
>       conn = psycopg2.connect("dbname='kforge' user='kforge' host='localhost' password='mypass123'");
>   except Exception, e:
>       print e
>
> Any advice or help would be greatly appreciated.
>
> Thanks,
>
> Ty
>
>
>
>
> _______________________________________________
> kforge-user mailing list
> kforge-user at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/kforge-user
>



-- 
Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/




More information about the kforge-user mailing list