The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #10367

Empty yaml file cause hiera to fail

Added by Ken Barber over 4 years ago. Updated almost 4 years ago.

Status:Merged - Pending ReleaseStart date:10/28/2011
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Keywords: Affected Hiera Version:

We've Moved!

Ticket tracking is now hosted in JIRA:


(moved from github – originally raised by bleonsfl)

I had an issue where I kept getting the following error message when running puppet:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `empty?' for nil:NilClass at

Turned out that I had a yaml file which was empty, actually only the header “—–” was present. This seems to make hiera fail.


#1 Updated by Hunter Haugen over 4 years ago

  • Status changed from Accepted to Code Insufficient

This is basically fixed in, but there is another aspect of this bug.

If {} or [] are passed as default values for hashes or arrays then the .empty? in hiera-puppet functions hiera_hash() hiera_array() or hiera_include() will be triggered. This should actually be checking for .nil? or something.

#2 Updated by Kelsey Hightower almost 4 years ago

  • Category set to hiera-puppet
  • Status changed from Code Insufficient to Merged - Pending Release
  • Branch set to


The issue you’ve reported should also be fixed here:

Also available in: Atom PDF