puppetlabs/puppet · error · Puppet::ParseError
Could not find template '%{file}'
Error message
Could not find template '%{file}' What it means
Error "Could not find template '%{file}'" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/pops/evaluator/epp_evaluator.rb:41
evaluate(parser, 'inline_epp', scope, false, result, template_args)
end
def self.epp(scope, file, env_name, template_args = nil)
unless file.is_a?(String)
# TRANSLATORS 'epp()' is a method name and should not be translated
raise ArgumentError, _("epp(): the first argument must be a String with the filename, got a %{class_name}") % { class_name: file.class }
end
unless Puppet::FileSystem.exist?(file)
unless file =~ /\.epp$/
file += ".epp"
end
end
scope.debug "Retrieving epp template #{file}"
template_file = Puppet::Parser::Files.find_template(file, env_name)
if template_file.nil? || !Puppet::FileSystem.exist?(template_file)
raise Puppet::ParseError, _("Could not find template '%{file}'") % { file: file }
end
# Parse and validate the source
parser = Puppet::Pops::Parser::EvaluatingParser::EvaluatingEppParser.new
begin
result = parser.parse_file(template_file)
rescue Puppet::ParseError => e
# TRANSLATORS 'epp()' is a method name and 'EPP' refers to 'Embedded Puppet (EPP) template' and should not be translated
raise ArgumentError, _("epp(): Invalid EPP: %{detail}") % { detail: e.message }
end
# Evaluate (and check template_args)
evaluate(parser, 'epp', scope, true, result, template_args)
end
def self.evaluate(parser, func_name, scope, use_global_scope_only, parse_result, template_args)
template_args, template_args_set = handle_template_args(func_name, template_args)
View on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/pops/evaluator/epp_evaluator.rb:41 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/bec92dc2ee8e3c63.
Report an issue: GitHub.