subscription-manager commands fails with the error "configparser.InterpolationSyntaxError: bad interpolation variable reference '%(ca_cert_dir)redhat-uep.pem'"

Solution Verified - Updated -

Issue

  • subscription-manager commands fails with the below error:-

    # subscription-manager clean
    Traceback (most recent call last):
      File "/usr/sbin/subscription-manager", line 11, in <module>
        load_entry_point('subscription-manager==1.28.40', 'console_scripts', 'subscription-manager')()
      File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 79, in main
        return managercli.ManagerCLI().main()
      File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3830, in __init__
        CLI.__init__(self, command_classes=commands)
      File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 110, in __init__
        cmd = clazz()
      File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3159, in __init__
        for name, _value in list(section.items()):
      File "/usr/lib64/python3.6/_collections_abc.py", line 744, in __iter__
        yield (key, self._mapping[key])
      File "/usr/lib64/python3.6/site-packages/rhsmlib/services/config.py", line 108, in __getitem__
        if key in self:
      File "/usr/lib64/python3.6/site-packages/rhsmlib/services/config.py", line 126, in __contains__
        return self._parser.has_option(self._section, key)
      File "/usr/lib64/python3.6/site-packages/rhsm/config.py", line 288, in has_option
        self.get(section, prop)
      File "/usr/lib64/python3.6/site-packages/rhsm/config.py", line 188, in get
        return SafeConfigParser.get(self, section, prop)
      File "/usr/lib/python3.6/site-packages/iniparse/compat.py", line 228, in get
        return self._interpolate(section, option, value, d)
      File "/usr/lib/python3.6/site-packages/iniparse/compat.py", line 304, in _interpolate
        self._interpolate_some(option, L, rawval, section, vars, 1)
      File "/usr/lib/python3.6/site-packages/iniparse/compat.py", line 329, in _interpolate_some
        "bad interpolation variable reference %r" % rest)
    configparser.InterpolationSyntaxError: bad interpolation variable reference '%(ca_cert_dir)redhat-uep.pem'
    

Environment

  • Red Hat Enterprise Linux (RHEL)
  • Red Hat Subscription Manager (RHSM)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content