WebFaction
Community site: login faq

I'm having great difficulty accessing a PostgreSQL database from my Turbogears application. Normally when I create a Turbogears application one of the required steps is to run 'paster setup-app development.ini' which creates database tables (as specified in bootstrap.py), however when I create an application via the WebFaction control panel there is no option to initiate this process. And when I try to run the 'paster setup-app' command from a ssh shell I get:

DistributionNotFound: Not Found: tg.devtools....etc.

I understood that if I edit the database section in development.ini correctly (which I'm sure I have) then the database should be accessible from my program, even if I add the tables manually via phpPgAdmin, but alas I keep getting:

OperationalError: (OperationalError) no such table: tg_user u'SELECT tg_user.password AS tg_user_password,......etc.

Anyone else have this problem?

Thanks, mpearce

asked 14 Mar '12, 06:45

mpearce
129
accept rate: 0%


Be sure you are running the correct paster app, this is the format for the command,

/home/<username>/webapps/<appname>/bin/paster setup-app /path/to/development.ini

Where 'username' and 'appname' are the user and app name and /path/to.development.ini is the path to development.ini if not in the current working directory.

I checked your user account and there is a paster app in ~/bin/ and it is the default,

$ which paster
~/bin/paster

I also could only find 1 app with a development.ini and it appeared to be working.

You may submit a support ticket if you would like us to look and reply directly.

permanent link

answered 14 Mar '12, 18:18

johns
5.4k412
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×109
×13

question asked: 14 Mar '12, 06:45

question was seen: 2,769 times

last updated: 14 Mar '12, 18:18

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM