← Back to team overview

configglue team mailing list archive

[Bug 1018569] [NEW] doesn't report config filename on error

 

Public bug reported:

I just got this huge traceback for a bad value in a config file. But I
have no idea which config file it was. Is there a way to report which
file caused configglue to choke? It would certainly help me! Thanks.

Here's the traceback:

Traceback (most recent call last):
  File "django_project/manage.py", line 4, in <module>
    import settings # Assumed to be in the same directory.
  File "/home/john/code/canonical-identity-provider/django_project/settings.py", line 18, in <module>
    configglue(schema, config_files, __name__)
  File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/django_configglue-0.6.1-py2.7.egg/django_configglue/utils.py", line 57, in configglue
    update_settings(scp, target)
  File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/django_configglue-0.6.1-py2.7.egg/django_configglue/utils.py", line 32, in update_settings
    settings = get_django_settings(parser)
  File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/django_configglue-0.6.1-py2.7.egg/django_configglue/utils.py", line 25, in get_django_settings
    for section, data in parser.values().items():
  File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/parser.py", line 230, in values
    sect.name, opt.name, parse=parse)
  File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/parser.py", line 497, in get
    value = self.parse(section, option, value)
  File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/parser.py", line 344, in parse
    value = option_obj.parse(value, **kwargs)
  File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/schema.py", line 652, in parse
    parsed = dict(parser.items(value))
  File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/parser.py", line 197, in items
    value = self._interpolate(section, option, d[option], d)
  File "/usr/lib/python2.7/ConfigParser.py", line 683, in _interpolate
    self._interpolate_some(option, L, rawval, section, vars, 1)
  File "/usr/lib/python2.7/ConfigParser.py", line 708, in _interpolate_some
    "bad interpolation variable reference %r" % rest)
ConfigParser.InterpolationSyntaxError: bad interpolation variable reference u'%(basedir)/PATH/TO/certificate.pem'

** Affects: configglue
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of
Configglue developers, which is the registrant for configglue.
https://bugs.launchpad.net/bugs/1018569

Title:
  doesn't report config filename on error

Status in configglue:
  New

Bug description:
  I just got this huge traceback for a bad value in a config file. But I
  have no idea which config file it was. Is there a way to report which
  file caused configglue to choke? It would certainly help me! Thanks.

  Here's the traceback:

  Traceback (most recent call last):
    File "django_project/manage.py", line 4, in <module>
      import settings # Assumed to be in the same directory.
    File "/home/john/code/canonical-identity-provider/django_project/settings.py", line 18, in <module>
      configglue(schema, config_files, __name__)
    File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/django_configglue-0.6.1-py2.7.egg/django_configglue/utils.py", line 57, in configglue
      update_settings(scp, target)
    File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/django_configglue-0.6.1-py2.7.egg/django_configglue/utils.py", line 32, in update_settings
      settings = get_django_settings(parser)
    File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/django_configglue-0.6.1-py2.7.egg/django_configglue/utils.py", line 25, in get_django_settings
      for section, data in parser.values().items():
    File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/parser.py", line 230, in values
      sect.name, opt.name, parse=parse)
    File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/parser.py", line 497, in get
      value = self.parse(section, option, value)
    File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/parser.py", line 344, in parse
      value = option_obj.parse(value, **kwargs)
    File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/schema.py", line 652, in parse
      parsed = dict(parser.items(value))
    File "/home/john/code/canonical-identity-provider/.env/local/lib/python2.7/site-packages/configglue/parser.py", line 197, in items
      value = self._interpolate(section, option, d[option], d)
    File "/usr/lib/python2.7/ConfigParser.py", line 683, in _interpolate
      self._interpolate_some(option, L, rawval, section, vars, 1)
    File "/usr/lib/python2.7/ConfigParser.py", line 708, in _interpolate_some
      "bad interpolation variable reference %r" % rest)
  ConfigParser.InterpolationSyntaxError: bad interpolation variable reference u'%(basedir)/PATH/TO/certificate.pem'

To manage notifications about this bug go to:
https://bugs.launchpad.net/configglue/+bug/1018569/+subscriptions


Follow ups

References