It looks like you're trying to use SQLAlchemy with Catwalk, which is
not yet supported.
Kevin
On Sep 16, 2006, at 10:47 AM, jose wrote:
>
> Is database.py script using a different configuration file instead
> of dev.cfg ?
> my dev.cfg is like this one
> ---------------
> [global]
> sqlalchemy.dburi="postgres://pippo:[EMAIL PROTECTED]/mydb"
> server.environment="development"
> autoreload.package="gs"
> [/static]
> staticFilter.on = True
> staticFilter.dir = "static"
> ---------------
> but database.py doesn't find the token 'sqlalchemy.dburi' and I
> can't understand why. =-O
>
> 26 def get_engine():
> 27 "Retreives the engine based on the current configuration"
> 28 global _engine
> 29 if not _engine:
> 30 dburi = config.get("sqlalchemy.dburi")
> 31 if not dburi:
> 32 raise KeyError("No sqlalchemy database config
> found!")
> 33 _engine = sqlalchemy.create_engine(dburi)
> 34 metadata.connect(_engine)
> 35 elif not metadata.is_bound():
> 36 metadata.connect(_engine)
> 37 return _engine
>
>
>
>
> Jose Soares wrote:
>
>> Hi all,
>>
>> I'm using sqlalchemy and I have in my dev.cfg the line:
>>
>> sqlalchemy.dburi="postgres://pippo:[EMAIL PROTECTED]/mydb"
>>
>> I can run
>>
>> $ python prj-start.py
>>
>> but:
>>
>> $ tg-admin toolbox
>>
>> Traceback (most recent call last):
>> File "/usr/local/bin/tg-admin", line 7, in ?
>> sys.exit(
>> File
>> "/usr/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/
>> turbogears/command/base.py",
>> line 351, in main
>> command.run()
>> File
>> "/usr/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/
>> turbogears/command/base.py",
>> line 297, in run
>> root = SecureObject(toolbox.Toolbox(),from_any_host
>> (self.hostlist),
>> exclude=['noaccess'])
>> File
>> "/usr/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/
>> turbogears/toolbox/base.py",
>> line 95, in __init__
>> self.toolbox = self.get_tools()
>> File
>> "/usr/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/
>> turbogears/toolbox/base.py",
>> line 107, in get_tools
>> setattr(self, i.name, tool())
>> File
>> "/usr/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/
>> turbogears/toolbox/catwalk/__init__.py",
>> line 112, in __init__
>> self.model = turbogears.util.get_model()
>> File
>> "/usr/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/
>> turbogears/util.py",
>> line 118, in get_model
>> package = __import__(package_name, {}, {}, ["model"])
>> File "/home/jose/turbosicer/sicer/model/__init__.py", line 6, in ?
>> from sicer.model import tables
>> File "/home/jose/turbosicer/sicer/model/tables.py", line 7, in ?
>> database.bind_meta_data()
>> File
>> "/usr/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/
>> turbogears/database.py",
>> line 49, in bind_meta_data
>> get_engine()
>> File
>> "/usr/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/
>> turbogears/database.py",
>> line 32, in get_engine
>> raise KeyError("No sqlalchemy database config found!")
>> KeyError: 'No sqlalchemy database config found!
>>
>>
>> Any ideas?
>>
>> j
>>
>>
>>
>>>
>>
>>
>
>
> >
--
Kevin Dangoor
TurboGears / Zesty News
email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---