Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1630 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

Warning about logger in unittests of freshstarted project with identity

Reported by: chrisz Owned by: anonymous
Priority: low Milestone: 1.0.4
Component: TurboGears Version: 1.0.4b3
Severity: minor Keywords:


When I run the unit tests for a fresh project created with

tg-admin quickstart -i foo

I get the following warning in the output:

No handlers could be found for logger "turbogears.identity.soprovider"

This is not an error, just not nice and maybe irritating for new users.


logging_problem.patch Download (1.8 KB) - added by chrisz 12 years ago.
Patch against 1.0 branch

Change History

Changed 12 years ago by chrisz

Patch against 1.0 branch

comment:1 Changed 12 years ago by chrisz

The problem is that testutil reads only test.cfg and app.cfg, but neither dev.cfg nor log.cfg. So I have added the log config to test.cfg. I have also configured a logger for turbogears.identity in dev.cfg.

comment:2 Changed 12 years ago by Chris Arndt

Though I didn't get the error (with TG from SVN) in the first place, the patch is sensible, works for me and doesn't break anything.

+1 on submitting it.

comment:3 Changed 12 years ago by chrisz

Did you create a fresh project with "-i"? You can see the same warning in #1216.

comment:4 Changed 12 years ago by Chris Arndt

Yes, I created a project witg TG revision r3827 and the command tg-admin quickstart -i -p itest ITest

Then I did

Error: Failed to load processor bash
No macro or processor named 'bash' found

and the output was

running test
running egg_info
writing requirements to ITest.egg-info/requires.txt
writing ITest.egg-info/PKG-INFO
writing top-level names to ITest.egg-info/top_level.txt
writing dependency_links to ITest.egg-info/dependency_links.txt
writing entry points to ITest.egg-info/entry_points.txt
reading manifest file 'ITest.egg-info/SOURCES.txt'
writing manifest file 'ITest.egg-info/SOURCES.txt'
running build_ext
collector in ['/home/chris/tmp/build/ITest'] ... test module itest in /home/chris/tmp/build/ITest ... test directory /home/chris/tmp/build/ITest/itest in itest ... test module itest.config in /home/chris/tmp/build/ITest ... test directory /home/chris/tmp/build/ITest/itest/config in itest.config ... test module itest.templates in /home/chris/tmp/build/ITest ... test directory /home/chris/tmp/build/ITest/itest/templates in itest.templates ... test module itest.tests in /home/chris/tmp/build/ITest ... test directory /home/chris/tmp/build/ITest/itest/tests in itest.tests ... test module itest.tests.test_controllers in /home/chris/tmp/build/ITest ... test class <class 'itest.tests.test_controllers.TestPages'> ... The indexpage should have the right title ... ok
login page should have the right title ... ok
the index method should return a string called now ... ok
test module itest.tests.test_model in /home/chris/tmp/build/ITest ... 
Ran 15 tests in 1.433s


After applying your patch and creating a new project (I checked that the config files had the changes), I got the same output.

comment:5 Changed 12 years ago by chrisz

Ok, now I understand. In my TG installation I had already applied patch #1628 which adds another identity test to test_controllers.py. The standard tests in test_controllers.py do not reveal the problem because they don't produce any log output. But as soon as you do something more complicated and log output is created, then you'll get this warning.

comment:6 Changed 12 years ago by Chris Arndt

Chris, when you check this in, be sure to add short explanation to the upgrade instructions at  http://docs.turbogears.org/1.0/RoughDocs/Upgrade on how to add the new logging configuration to old projects. Thx!

comment:7 Changed 12 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to fixed


comment:8 Changed 12 years ago by Chris Arndt

Fixed in r3830.

Note: See TracTickets for help on using tickets.