Search code examples
devopssalt-project

salt error : "TypeError: coercing to Unicode: need string or buffer, bool found"


Getting below error while running salt command like: salt "" state.sls export-job

Can some one help on this issue ?

  Function: pkg.installed
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1745, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1702, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.7/dist-packages/salt/states/pkg.py", line 1442, in installed
                  **kwargs)
                File "/usr/lib/python2.7/dist-packages/salt/modules/aptpkg.py", line 637, in install
                  deb_info = __salt__['lowpkg.bin_pkg_info'](pkg_source)
                File "/usr/lib/python2.7/dist-packages/salt/modules/dpkg.py", line 67, in bin_pkg_info
                  if not os.path.exists(path):
                File "/usr/lib/python2.7/genericpath.py", line 18, in exists
                  os.stat(path)
              TypeError: coercing to Unicode: need string or buffer, bool found
     Started: 08:29:27.066443
    Duration: 39.616 ms
     Changes:

Solution

  • check this page --> https://github.com/saltstack/salt/issues/12400. they are talking about the similar issue.