Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jinja variable 'dict object' has no attribute 'iteritems' #17

Open
MurzNN opened this issue May 31, 2021 · 2 comments
Open

Jinja variable 'dict object' has no attribute 'iteritems' #17

MurzNN opened this issue May 31, 2021 · 2 comments

Comments

@MurzNN
Copy link

MurzNN commented May 31, 2021

I trying to use this formula with simple pillar from example:

rsyslog:
  client:
    enabled: true
    format:
      name: TraditionalFormatWithPRI
      template: '"%syslogpriority% %syslogfacility% %timestamp:::date-rfc3339% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"'
    output:
      file:
        -/var/log/syslog:
          filter: '*.*;auth,authpriv.none'
          user: syslog
          group: adm
          createmode: 0640
          umask: 0022

But got the error:

    Data failed to compile:
----------
    Rendering SLS 'base:rsyslog.client' failed: Jinja variable 'dict object' has no attribute 'iteritems'

Why this happens and how to fix it?

@fpytloun
Copy link
Member

Hello, that's python3 incompatibility. It should be just items. Please send MR with fix and I'll merge it.

@bigjimlefou
Copy link
Contributor

Hi, I've submitted a pull request for this.

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

No branches or pull requests

3 participants