puppetlabs/puppet · error · ArgumentError
The format must be a one letter format specifier, got '#{@fo
Error message
The format must be a one letter format specifier, got '#{@format}' What it means
Error "The format must be a one letter format specifier, got '#{@format}'" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/pops/types/string_converter.rb:111
DELIMITER_MAP = {
'[' => ['[', ']'],
'{' => ['{', '}'],
'(' => ['(', ')'],
'<' => ['<', '>'],
'|' => ['|', '|'],
:space => ['', '']
}.freeze
def initialize(fmt)
@orig_fmt = fmt
match = FMT_PATTERN.match(fmt)
unless match
raise ArgumentError, "The format '#{fmt}' is not a valid format on the form '%<flags><width>.<prec><format>'"
end
@format = match[4]
unless @format.is_a?(String) && @format.length == 1
raise ArgumentError, "The format must be a one letter format specifier, got '#{@format}'"
end
@format = @format.to_sym
flags = match[1].split('') || []
unless flags.uniq.size == flags.size
raise ArgumentError, "The same flag can only be used once, got '#{fmt}'"
end
@left = flags.include?('-')
@alt = flags.include?('#')
@plus = if flags.include?(' ')
:space
else
flags.include?('+') ? :plus : :ignore
end
@zero_pad = flags.include?('0')
@delimiters = nilView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/pops/types/string_converter.rb:111 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/bf40ee1ca83c47ce.
Report an issue: GitHub.