puppetlabs/puppet · error · Puppet::ParseError
Failed to parse template %{file}: Filepath: %{file_path}
Error message
Failed to parse template %{file}:
Filepath: %{file_path}
Line: %{line}
Detail: %{detail}
What it means
Error "Failed to parse template %{file}: Filepath: %{file_path} Line: %{line} Detail: %{detail} " thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/parser/functions/template.rb:39
)
end
vals.collect do |file|
# Use a wrapper, so the template can't get access to the full
# Scope object.
debug "Retrieving template #{file}"
wrapper = Puppet::Parser::TemplateWrapper.new(self)
wrapper.file = file
begin
wrapper.result
rescue => detail
info = detail.backtrace.first.split(':')
message = []
message << _("Failed to parse template %{file}:") % { file: file }
message << _(" Filepath: %{file_path}") % { file_path: info[0] }
message << _(" Line: %{line}") % { line: info[1] }
message << _(" Detail: %{detail}") % { detail: detail }
raise Puppet::ParseError, message.join("\n") + "\n"
end
end.join("")
end
View on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/parser/functions/template.rb:39 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/9d74f0b6daf59f86.
Report an issue: GitHub.