[chef] Re: Execute resource failing on special characters?


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Cc: Greg Barker < >
  • Subject: [chef] Re: Execute resource failing on special characters?
  • Date: Tue, 21 Apr 2015 00:50:54 -0700

On 4/17/15 2:45 PM, Greg Barker wrote:
" type="cite">
One of my recipes deploys a Django app and then installs the dependencies into the virtualenv like so:

execute "/my-virtualenv/bin/pip install -r /var/www/mysite.com/current/requirements.txt" do
    cwd "/var/www/mysite.com/current"
end

This is failing when it tries to install unicodecsv:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 615: ordinal not in range(128)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "/tmp/pip-build-ik16hgxe/unicodecsv/setup.py", line 11, in <module>
    long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst'), 'r').read(),
  File "/my-virtualenv/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 615: ordinal not in range(128)

Apparently it doesn't like the special characters in the README.rst of that package.

However, if I run the command manually from a bash prompt as root, it works fine. How come it fails when execute tries to do it? I'm running chef-client 11.16.2. Thanks!
Its probably running that with LC_ALL=C, try using Chef 12.x which should have fixed that problem.



Archive powered by MHonArc 2.6.16.

§