puppetlabs/puppet · error · IniParseError
Cannot read nonexistent file %{file}
Error message
Cannot read nonexistent file %{file} What it means
Error "Cannot read nonexistent file %{file}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/util/inifile.rb:140
attr_accessor :destroy_empty
# @!attribute [rw] file_collection
# @return [Puppet::Util::IniConfig::FileCollection]
attr_accessor :file_collection
def initialize(file, options = {})
@file = file
@contents = []
@filetype = Puppet::Util::FileType.filetype(:flat).new(file)
@destroy_empty = options.fetch(:destroy_empty, false)
end
# Read and parse the on-disk file associated with this object
def read
text = @filetype.read
if text.nil?
raise IniParseError, _("Cannot read nonexistent file %{file}") % { file: @file.inspect }
end
parse(text)
end
INI_COMMENT = Regexp.union(
/^\s*$/,
/^[#;]/,
/^\s*rem\s/i
)
INI_CONTINUATION = /^[ \t\r\n\f]/
INI_SECTION_NAME = /^\[([^\]]+)\]/
INI_PROPERTY = /^\s*([^\s=]+)\s*=\s*(.*)$/
# @api private
def parse(text)
section = nil # The name of the current section
optname = nil # The name of the last option in sectionView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/util/inifile.rb:140 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/d4b0dc86f1ec43c9.
Report an issue: GitHub.