Hi, I have a site running Zope 2.9.6 which thinks it is running in debug mode. I've tried putting debug-mode off in the zope.conf, and also leaving out the line about debug-mode completely, but neither work - the site still believes it is running in debug mode! As far as I can see, it appears that it is using the DefaultConfiguration from App.config - certainly changing debug mode there from True to False solved the problem. However, I could not find where in the code the configuration was explicitly loaded on startup in order to verify what was going on. Any ideas where this might be? And what might be the root cause of it (it is fine on other machines that have been built using the same script). Also, I was finding it hard to debug the problem as to get any output/use pdb, I have to start the site in debug mode anyway! Any ideas for how I can trace through the startup code much appreciated...! Thanks, Miles
Miles wrote at 2007-5-30 16:45 +0100:
... As far as I can see, it appears that it is using the DefaultConfiguration from App.config - certainly changing debug mode there from True to False solved the problem. However, I could not find where in the code the configuration was explicitly loaded on startup in order to verify what was going on.
Strange. Usually, the "DefaultConfiguration" is used only when no configuration file is read (e.g. during the test suite). When the configuration file is read, is uses "App.config.setConfiguration" to update the used configuration away from "DefaultConfiguration" to the read in configuration. This happens in "Zope2.Startup.run._setconfig". -- Dieter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Miles wrote:
I have a site running Zope 2.9.6 which thinks it is running in debug mode.
I've tried putting debug-mode off in the zope.conf, and also leaving out the line about debug-mode completely, but neither work - the site still believes it is running in debug mode!
As far as I can see, it appears that it is using the DefaultConfiguration from App.config - certainly changing debug mode there from True to False solved the problem. However, I could not find where in the code the configuration was explicitly loaded on startup in order to verify what was going on. Any ideas where this might be? And what might be the root cause of it (it is fine on other machines that have been built using the same script).
Also, I was finding it hard to debug the problem as to get any output/use pdb, I have to start the site in debug mode anyway! Any ideas for how I can trace through the startup code much appreciated...!
How are you starting Zope? The 'fg' command of 'zopectl' forces debug mode to be on; you need 'start' to run without that. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGXcKg+gerLs4ltQ4RAlBxAKDSEAbxZZ3AbKNVIDeLZEO4asJTJQCeNl0C s5vPe7JIMAky1ABC/F2NWN0= =mjrh -----END PGP SIGNATURE-----
participants (3)
-
Dieter Maurer -
Miles -
Tres Seaver