On Tue, 2010-05-04 at 14:53 +0100, Chris Withers wrote: > Chris McDonough wrote: > > On Fri, 2010-04-30 at 19:13 +0100, Chris Withers wrote: > >> Hi All, > >> > >> Because I need to use the Twisted WSGI server for my app and so can't > >> use Paste, > > > > While it's obviously useful to not require PasteDeploy, this itself is > > not true. You can use something like: > > > > from repoze.bfg.paster import get_app > > > > app = get_app('some_config_file.ini', 'myapp') > > Fair enough, but it's the .ini that the powers that be don't want here ;-)
Why not? > >> exceptions.NotImplementedError: Can't perform this operation for > >> unregistered loader type > >> > >> Why does BFG guess wrong here and how can I correct BFG's notion of what > >> the current package is? > > > > config = Configurator(package=some.package, ...) > > > > ... might be the right solution, depending on how you're calling it. > > > > http://docs.repoze.org/bfg/1.3/api/configuration.html#repoze.bfg.configuration.Configurator > > "If None is passed (the default), the package is assumed to be the > Python package in which the caller of the Configurator constructor lives." > > I'm calling it from within the module called run.py in the right package > (as per the demo). Should I report it as a bug that the wrong package is > picked as the base? Sure. If you provide a reproducible test case, I can try to look at it. - C _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev