puppetlabs/puppet · error · ArgumentError
epp(): the first argument must be a String with the filename
Error message
epp(): the first argument must be a String with the filename, got a %{class_name} What it means
Error "epp(): the first argument must be a String with the filename, got a %{class_name}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/pops/evaluator/epp_evaluator.rb:29
end
# Parse and validate the source
parser = Puppet::Pops::Parser::EvaluatingParser::EvaluatingEppParser.new
begin
result = parser.parse_string(epp_source, 'inlined-epp-text')
rescue Puppet::ParseError => e
# TRANSLATORS 'inline_epp()' is a method name and 'EPP' refers to 'Embedded Puppet (EPP) template' and should not be translated
raise ArgumentError, _("inline_epp(): Invalid EPP: %{detail}") % { detail: e.message }
end
# Evaluate (and check template_args)
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)View on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/pops/evaluator/epp_evaluator.rb:29 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/db4482a44b36c6a2.
Report an issue: GitHub.