Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

configman.value_sources.source_exceptions.NoHandlerForType: <type 'str'> #104

Open
peterbe opened this issue Apr 7, 2014 · 2 comments
Open
Assignees

Comments

@peterbe
Copy link
Contributor

peterbe commented Apr 7, 2014

(crontabber)peterbe@mpb:~/dev/PYTHON/crontabber/exampleapp (runner *%)$ crontabber --admin.print_conf=ini
Traceback (most recent call last):
  File "/Users/peterbe/virtualenvs/crontabber/bin/crontabber", line 9, in <module>
    load_entry_point('crontabber==0.1', 'console_scripts', 'crontabber')()
  File "/Users/peterbe/virtualenvs/crontabber/lib/python2.7/site-packages/crontabber-0.1-py2.7.egg/crontabber/app.py", line 1149, in local_main
    sys.exit(main(CronTabber))
  File "/Users/peterbe/virtualenvs/crontabber/lib/python2.7/site-packages/crontabber-0.1-py2.7.egg/crontabber/generic_app.py", line 214, in main
    config_manager_cls
  File "/Users/peterbe/virtualenvs/crontabber/lib/python2.7/site-packages/crontabber-0.1-py2.7.egg/crontabber/generic_app.py", line 280, in _do_main
    config_pathname=config_path
  File "/Users/peterbe/virtualenvs/crontabber/lib/python2.7/site-packages/configman/config_manager.py", line 223, in __init__
    self
  File "/Users/peterbe/virtualenvs/crontabber/lib/python2.7/site-packages/configman/value_sources/__init__.py", line 164, in wrap
    raise NoHandlerForType(type(a_source))
configman.value_sources.source_exceptions.NoHandlerForType: <type 'str'>

The temporary solution is to make an empty file called config/crontabber.ini which I shouldn't have to :)

@peterbe
Copy link
Contributor Author

peterbe commented Apr 15, 2014

@twobraids is this solved by 0ec1864 ?

@peterbe
Copy link
Contributor Author

peterbe commented Apr 15, 2014

I've found another case where this happens.

I upgraded to the latest and greatest configman into socorro (as part of replacing socorro.cron.crontabber with crontabber) and I ran this:

PYTHONPATH=. socorro/cron/crontabber_app.py --admin.conf=sluggish/crontabber.ini.new

and got this

Traceback (most recent call last):
  File "socorro/cron/crontabber_app.py", line 64, in <module>
    sys.exit(main(CronTabberWrapper))
  File "/Users/peterbe/virtualenvs/socorro/src/crontabber/crontabber/generic_app.py", line 211, in main
    config_manager_cls
  File "/Users/peterbe/virtualenvs/socorro/src/crontabber/crontabber/generic_app.py", line 277, in _do_main
    config_pathname=config_path
  File "/Users/peterbe/virtualenvs/socorro/lib/python2.6/site-packages/configman/config_manager.py", line 223, in __init__
    self
  File "/Users/peterbe/virtualenvs/socorro/lib/python2.6/site-packages/configman/value_sources/__init__.py", line 166, in wrap
    raise NoHandlerForType(type(a_source))
configman.value_sources.source_exceptions.NoHandlerForType: <type 'str'>

The solution in this case was simple, I did mv sluggish/crontabber.ini.new sluggish/crontabber.ini.
It's fair that configman doesn't know what the heck to do with a filed called something.something.new. That was my mistake. The mistake configman did was swallow the error and spit out a different one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants