Re: missing psycopg2 database

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Bill House <wch-tech(at)house-grp(dot)net>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: missing psycopg2 database
Date: 2011-03-30 14:09:17
Message-ID: AANLkTinuWK_aNosB2o3JSLogHrLpWYGATeO90p6eEg-N@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Wed, Mar 30, 2011 at 2:01 PM, Bill House <wch-tech(at)house-grp(dot)net> wrote:

>>>> help('modules keywords')

> keyword - Keywords (from "graminit.c")
> Failed connection to test db: OperationalError FATAL:  database
> "psycopg2_test" does not exist
>
> Please set env vars 'PSYCOPG2_TESTDB*' to valid values.

> I poked around the module but did not see any language which looked like
> it would be used to create this database in my server.
>
> Would someone tell me what I missed or where to find the instructions for creating the psycopg2_test database?

The command you typed is probably trying to aggressively import
everything it found. This is what is trying to do on my box:

In [1]: help('modules keywords')

Here is a list of matching modules. Enter any module name to get more help.

keyword - Keywords (from "graminit.c")
Speech Dispatcher configuration tool
Do you want to setup a completely new configuration? [yes] :

For you, looks like it's trying to import psycopg2.tests. I would say
"don't do that". You don't need a test database unless you are running
the test suite (in which case it just have to be an empty database).
Nothing in psycopg imports the test module. However I don't like side
effects at import time (and "sys.exit(1)" is probably a particularly
unwanted one), so I'll change the test suite to not make that check at
import time.

Cheers,

-- Daniele

In response to

Browse psycopg by date

  From Date Subject
Next Message Lasntonpeng 2011-03-31 12:54:34 Please Help me with connecting my PostgreSQL
Previous Message Bill House 2011-03-30 13:01:42 missing psycopg2 database