puppetlabs/puppet · error · ArgumentError

is not a good copyright year, set, or range

Error message

%{value} is not a good copyright year, set, or range

What it means

Catch-all in munge_copyright_year: the input to copyright years was not a Range, Integer, String, or Array (e.g. a Hash or nil), so it cannot be interpreted as a year, set, or range.

Solutions

  1. Pass an Integer, Range, String, or Array of years/ranges
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/puppet/interface/documentation.rb:359 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/292d13427325d6c7. Report an issue: GitHub.

Appendix: source

Thrown at lib/puppet/interface/documentation.rb:359

            end
          end
        end

      when Array then
        result = []
        input.each do |item|
          item = munge_copyright_year item
          if item.is_a? Array
            result.concat item
          else
            result << item
          end
        end
        result

      else
        # TRANSLATORS 'copyright' is an attribute name and should not be translated
        raise ArgumentError, _("%{value} is not a good copyright year, set, or range") % { value: input.inspect }
      end
    end
  end
end

View on GitHub (pinned to e227c27540)