puppetlabs/puppet · error · ArgumentError

epp(): Invalid EPP: %{detail}

Error message

epp(): Invalid EPP: %{detail}

What it means

Error "epp(): Invalid EPP: %{detail}" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/pops/evaluator/epp_evaluator.rb:50

    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)

    body = parse_result.body
    unless body.is_a?(Puppet::Pops::Model::LambdaExpression)
      # TRANSLATORS 'LambdaExpression' is a class name and should not be translated
      raise ArgumentError, _("%{function_name}(): the parser did not produce a LambdaExpression, got '%{class_name}'") %
                           { function_name: func_name, class_name: body.class }
    end
    unless body.body.is_a?(Puppet::Pops::Model::EppExpression)
      # TRANSLATORS 'EppExpression' is a class name and should not be translated
      raise ArgumentError, _("%{function_name}(): the parser did not produce an EppExpression, got '%{class_name}'") %

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/pops/evaluator/epp_evaluator.rb:50 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/c0a049d8740b0f60. Report an issue: GitHub.