puppetlabs/puppet · error · Puppet::ParseError
Numerical variables cannot be changed. Attempt to set $%{nam
Error message
Numerical variables cannot be changed. Attempt to set $%{name} What it means
Error "Numerical variables cannot be changed. Attempt to set $%{name}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/parser/scope.rb:154
else
super
end
end
def include?(name)
bound?(name) or super
end
def bound?(name)
# A "match variables" scope reports all numeric variables to be bound if the scope has
# match_data. Without match data the scope is transparent.
#
@match_data && name =~ /^\d+$/
end
def []=(name, value)
# TODO: Bad choice of exception
raise Puppet::ParseError, _("Numerical variables cannot be changed. Attempt to set $%{name}") % { name: name }
end
def delete(name)
# TODO: Bad choice of exception
raise Puppet::ParseError, _("Numerical variables cannot be deleted: Attempt to delete: $%{name}") % { name: name }
end
def add_entries_to(target = {}, include_undef = false)
# do not include match data ($0-$n)
super
end
end
# @api private
class ParameterScope < Ephemeral
class Access
attr_accessor :value
View on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/parser/scope.rb:154 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/9a5f40637343a472.
Report an issue: GitHub.