Am unable to successfully run "tg-admin sql create" on command line
I believe I have successfully installed turbogears,python 2.4, psycopg, postgresql 8.
 
I have no idea what I am doing wrong. I can get to the database server using pgadmin. Am I not supposed to specify the databse password or server port in the call to sqlobject?
 
HELP!!! Thanks in advance.
 
David
my dev.cfg file
 
# This is where all of your settings go for your development environment
[global]
# DATABASE
# pick the form for your database
# sqlobject.dburi="postgres://[EMAIL PROTECTED]/databasename"
sqlobject.dburi="postgres://[EMAIL PROTECTED]/eye"
# sqlobject.dburi="mysql://username:[EMAIL PROTECTED]:port/databasename"
# sqlobject.dburi="sqlite:///file_name_and_path"
# for Windows users, sqlite URIs look like:
# sqlobject.dburi="sqlite:///drive_letter|/path/to/file"

# VIEW
# kid.outputformat="html"
# The sitetemplate is used for overall styling of a site that
# includes multiple TurboGears applications
# tg.sitetemplate="<packagename.templates.templatename>"

# SERVER
# Some server parameters that you may want to tweak
# server.socketPort=8080
# Disable the debug output at the end on pages.
# logDebugInfoFilter.on = False
server.environment="development"
autoreload.package="wiki20"
[/static]
staticFilter.on = True
staticFilter.dir = "static"
 
the output:
 
C:\Python24\wiki20>tg-admin sql create
Using database URI postgres://[EMAIL PROTECTED]/eye
Traceback (most recent call last):
  File "C:\Python24\Scripts\tg-admin-script.py", line 7, in ?
    sys.exit(
  File "c:\python24\lib\site-packages\TurboGears-0.8a6-py2.4.egg\turbogears\comm
and\__init__.py", line 186, in main
    command.run()
  File "c:\python24\lib\site-packages\TurboGears-0.8a6-py2.4.egg\turbogears\comm
and\__init__.py", line 106, in run
    command.the_runner.run(sys.argv)
  File "c:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
r\command.py", line 102, in run
    runner.run()
  File "c:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
r\command.py", line 232, in run
    self.load_options_from_egg(egg_spec)
  File "c:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
r\command.py", line 415, in load_options_from_egg
    dist, conf = self.config_from_egg(egg_spec)
  File "c:\python24\lib\site-packages\SQLObject-0.7.0-py2.4.egg\sqlobject\manage
r\command.py", line 425, in config_from_egg
    pkg_resources.require(egg_spec)
  File "c:\python24\lib\site-packages\setuptools-0.6a9dev_r41857-py2.4.egg\pkg_r
esources.py", line 503, in require
    needed = self.resolve(parse_requirements(requirements))
  File "c:\python24\lib\site-packages\setuptools-0.6a9dev_r41857-py2.4.egg\pkg_r
esources.py", line 483, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: Wiki-20
C:\Python24\wiki20>
 
Note that psycopg works:
 
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Badawi>cd c:\Python24
C:\Python24>python
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg
>>>
 
My server runs fine:
C:\Python24\wiki20>python wiki20-start.py
2005/12/30 22:15:39 CONFIG INFO Server parameters:
2005/12/30 22:15:39 CONFIG INFO   server.environment: development
2005/12/30 22:15:39 CONFIG INFO   server.logToScreen: True
2005/12/30 22:15:39 CONFIG INFO   server.logFile:
2005/12/30 22:15:39 CONFIG INFO   server.protocolVersion: HTTP/1.0
2005/12/30 22:15:39 CONFIG INFO   server.socketHost:
2005/12/30 22:15:39 CONFIG INFO   server.socketPort: 8080
2005/12/30 22:15:39 CONFIG INFO   server.socketFile:
2005/12/30 22:15:39 CONFIG INFO   server.reverseDNS: False
2005/12/30 22:15:39 CONFIG INFO   server.socketQueueSize: 5
2005/12/30 22:15:39 CONFIG INFO   server.threadPool: 0
2005/12/30 22:15:41 HTTP INFO Serving HTTP on http://localhost:8080/
2005/12/30 22:21:12 HTTP INFO 127.0.0.1 - GET / HTTP/1.1
setting default site
2005-12-30 22:21:12,864 turbogears.view DEBUG Recompiling template for wiki20.te
mplates.welcome
2005-12-30 22:21:12,878 turbogears.view DEBUG Applying template wiki20.templates
.welcome
127.0.0.1 - - [2005/12/30 22:21:12] "GET / HTTP/1.1" 200 1582
 
 
 
 

Reply via email to