[Zope-dev] When is the configuration read in Zope 2.7?
Chris McDonough
chrism at plope.com
Fri May 14 18:54:34 EDT 2004
I've got no suggestions. Is it broken in the 2.7 branch at the moment?
On Fri, 2004-05-14 at 17:24, Andreas Jung wrote:
> No, this happened during the standard Zope startup.
>
> Andreas
>
> --On Freitag, 14. Mai 2004 13:25 Uhr -0400 Chris McDonough
> <chrism at plope.com> wrote:
>
> > Sounds like its using the "default" configuration (which means
> > Zope.configure never got called). I assume it works during normal
> > startup, just not during unit tests?
> >
> > On Fri, 2004-05-14 at 13:09, Andreas Jung wrote:
> >> During the product registration the ZReST product is imported. on the
> >> module level
> >> it contains
> >>
> >> default_output_encoding = getConfiguration().rest_output_encoding or
> >> default_enc
> >>
> >> I would inspect that at this point the configuration from zope.conf has
> >> been read and
> >> rest_output_encoding should be available but instead the following
> >> AttributeError
> >> occurs. Any ideas why?
> >>
> >>
> >> Traceback (most recent call last):
> >> File "test.py", line 490, in get_suite
> >> mod = package_import(modname)
> >> File "test.py", line 464, in package_import
> >> mod = __import__(modname)
> >> File
> >> "/home/chrism/opt/tests/sandbox/Zope/lib/python/AccessControl/tests/test
> >> UserFolder.py", line 24, in ?
> >> Zope.startup()
> >> File
> >> "/home/chrism/opt/tests/sandbox/Zope/lib/python/Zope/__init__.py",
> >> line 46, in startup
> >> _startup()
> >> File
> >> "/home/chrism/opt/tests/sandbox/Zope/lib/python/Zope/App/startup.py",
> >> line 45, in startup
> >> OFS.Application.import_products()
> >> File
> >> "/home/chrism/opt/tests/sandbox/Zope/lib/python/OFS/Application.py",
> >> line 631, in import_products
> >> import_product(product_dir, product_name, raise_exc=debug_mode)
> >> File
> >> "/home/chrism/opt/tests/sandbox/Zope/lib/python/OFS/Application.py",
> >> line 654, in import_product
> >> product=__import__(pname, global_dict, global_dict, silly)
> >> File
> >> "/home/chrism/opt/tests/sandbox/Zope/lib/python/Products/ZReST/__init__.
> >> py", line 7, in ?
> >> import ZReST
> >> File
> >> "/home/chrism/opt/tests/sandbox/Zope/lib/python/Products/ZReST/ZReST.py"
> >> , line 27, in ?
> >> default_output_encoding = getConfiguration().rest_output_encoding or
> >> default_enc
> >> AttributeError: DefaultConfiguration instance has no attribute
> >> 'rest_output_encoding'
> >>
> >> Andreas
>
>
More information about the Zope-Dev
mailing list