Re: missing psycopg2 database
От | Daniele Varrazzo |
---|---|
Тема | Re: missing psycopg2 database |
Дата | |
Msg-id | AANLkTinuWK_aNosB2o3JSLogHrLpWYGATeO90p6eEg-N@mail.gmail.com обсуждение исходный текст |
Ответ на | missing psycopg2 database (Bill House <wch-tech@house-grp.net>) |
Список | psycopg |
On Wed, Mar 30, 2011 at 2:01 PM, Bill House <wch-tech@house-grp.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
В списке psycopg по дате отправления: