-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode issues when performing dumpf on Redhat Enterprise 6 #133
Comments
I'm running into this problem as well, and it's a show stopper. I'm considering reverting to an earlier version of Blueprint to get stuff done. Perhaps repository bisection will help isolate the problem. |
One of my co-workers figured out a fix for this problem, though it's not in Blueprint. He patched the /usr/lib/python2.7/site.py file on the machine in question (64-bit Kubuntu v12.04) and changed the default encoding from 'ascii' to 'UTF-8' and it works now. There is a weak implication that it has to do with the default character encoding settings for the system and not Blueprint per se, but more digging will have to be done I think. |
@virtadpt thanks, that worked out for me. Is there a way to "programatically" set it? (like inside blueprint itself). Hacking python libs are too hacky |
I've no idea. I haven't found a better solution, nor has anyone else mentioned anything about it. |
When running "blueprint-show -S <blueprint_name>" from a fairly simple blueprint created via blueprint-rules, I got the following error:
I traced the problem down to the default /etc/services file on RHEL6. There's four lines in this file with 8-bit characters. The file had been modified on the original system, but I checked and these four lines exist in a freshly installed copy of RHEL6 too.
The core of the problem appears to be the code in sh.py around line 333, although I'm not sure exactly why it fails as Blueprint appears to correctly detect the file's contents are non-ascii and attempts to handle it. I wonder if maybe "encode('utf-8', 'ignore')" isn't actually working as expected here? (According to chardet the encoding of this /etc/service file is EUC-JP)
I found that reworking the code as shown below appears to solve the problem for me, and the content of the resulting script correctly replicates the 8-bit characters from the original. I'm just unsure if this will have other undesirable side effects.
The text was updated successfully, but these errors were encountered: