Caught Encoding::CompatibilityError

asked 2014-03-05 11:11:54 -0600

ajlanghorn gravatar image

updated 2014-03-05 17:05:32 -0600

Stefan gravatar image

NB: This is a cross-post from!topic/puppet-users/z4P-CmbyRxk .


I have a Puppet repository using Hiera as a lightweight ENC rather than the more traditional init.pp script in the manifests directory. When using Vagrant to test my commits work fine before opening a pull request, I've encountered the following:

Error: Could not parse for environment production: Caught Encoding::CompatibilityError: incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string) at /tmp/vagrant-puppet-1/manifests/site.pp:2 on node0

The file - site.pp - only contains one line...

vagrant ssh node0 -c 'cat -A /tmp ...
edit retag flag offensive close merge delete


does the behaviour change when you remove the `import` statement? Does the behaviour change when you remove the `hiera_include` statement?

Stefan gravatar imageStefan ( 2014-03-05 17:13:05 -0600 )edit

@Stefan: It works fine when I remove the `import` statement, but doesn't work (same error) when I remove the `hiera_include` statement. The MIME types on the files differ, though ...(more)

ajlanghorn gravatar imageajlanghorn ( 2014-03-06 02:56:28 -0600 )edit

to be honest if I no idea what might go wrong here. Can you rewrite the code in case there are some non-printable characters in the files? I'd also ...(more)

Stefan gravatar imageStefan ( 2014-03-07 13:13:37 -0600 )edit

Also: what version of puppet are you running? Can you run puppet with --debug and --trace? Does the behaviour change when you use `import 'nodes.pp'` instead of just `import 'nodes'`?

Stefan gravatar imageStefan ( 2014-03-07 13:21:44 -0600 )edit

@Stefan: In the end, in order to progress with the story assigned to me in our backlog, I decided to clone to repo in to a second directory and try ...(more)

ajlanghorn gravatar imageajlanghorn ( 2014-03-07 18:01:12 -0600 )edit