[Zope-dev] When is the configuration read in Zope 2.7?

Andreas Jung lists at zopyx.com
Fri May 14 13:09:03 EDT 2004


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/testUserFolder.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
-- 

Andreas Jung
--------------------------------
www.zopyx.com Software-Entwicklung und Consulting Andreas Jung



More information about the Zope-Dev mailing list