Comment 6 for bug 393037

Revision history for this message
Martitza (martitzam) wrote :

I think we are making progress. I read http://excid3.com/2009/06/no-handlers-could-be-found-for-logger/ and placed the suggested code at the end of the import and before def main(). Here is the diff:

=== modified file bzr_email_notifier.py
--- bzr_email_notifier.py 2009-10-15 09:22:47 +0000
+++ bzr_email_notifier.py 2009-10-19 03:28:08 +0000
@@ -30,6 +30,9 @@
 from configuration import Configuration, SendEmailError
 ###

+import logging
+logging.basicConfig()
+
 def main():

     try:

when I run

bzr-email-notifier$ ./bzr_email_notifier.py -v -c example.conf ~/Projects/

I no longer get the 'no handlers' error. But now I see this, which is probably unrelated:

WARNING:bzr:unknown command "revert"
WARNING:bzr:Unable to load plugin 'explorer' from '/home/martitza/.bazaar/plugins'
No 'new-branches' section in configuration - emails won't be sent when new branches are created
No 'removed-branches' section in configuration - emails won't be sent when branches are deleted

The first message is scary. Does that mean bzr-email-notifier is trying to 'bzr revert' my branches?!?!?

The second message is odd, because I run bzr-explorer all the time. I seem to recall that by design Bazaar Explorer is stored in .../plugins/explorer but the actual name of the plugin is explore. Originally, it had to be invoked as 'bzr explore' but 'bzr explorer' was recently registered as an alias. (Or maybe I got that backward.) Anyway, if I temporarily uninstall bzr-explorer, I get just these last two messages:

No 'new-branches' section in configuration - emails won't be sent when new branches are created
No 'removed-branches' section in configuration - emails won't be sent when branches are deleted

These messages are expected (because those sections of example.conf are empty).

So I think the logger problem is solved, and we have discovered an incompatibility with bzr-explorer. It is very interesting that the 'revert' warning went away when I removed bzr-explorer.