puppetlabs/puppet · error · ArgumentError
Unable to parse '%{str}' using any of the formats %{formats}
Error message
Unable to parse '%{str}' using any of the formats %{formats} What it means
Error "Unable to parse '%{str}' using any of the formats %{formats}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/pops/time/timespan.rb:117
hash[KEY_HOURS] || 0,
hash[KEY_MINUTES] || 0,
hash[KEY_SECONDS] || 0,
hash[KEY_MILLISECONDS] || 0,
hash[KEY_MICROSECONDS] || 0,
hash[KEY_NANOSECONDS] || 0
)
end
def self.parse(str, format = Format::DEFAULTS)
if format.is_a?(::Array)
format.each do |fmt|
fmt = FormatParser.singleton.parse_format(fmt) unless fmt.is_a?(Format)
begin
return fmt.parse(str)
rescue ArgumentError
end
end
raise ArgumentError, _("Unable to parse '%{str}' using any of the formats %{formats}") % { str: str, formats: format.join(', ') }
end
format = FormatParser.singleton.parse_format(format) unless format.is_a?(Format)
format.parse(str)
end
# @return [true] if the stored value is negative
def negative?
@nsecs < 0
end
def +(o)
case o
when Timestamp
Timestamp.new(@nsecs + o.nsecs)
when Timespan
Timespan.new(@nsecs + o.nsecs)
when Integer, Float
# Add secondsView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/pops/time/timespan.rb:117 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/74247a530c9e3df6.
Report an issue: GitHub.