Closed pocesar closed 6 years ago
blueprint show -S my-blueprint
Traceback (most recent call last):
File "/usr/local/bin/blueprint-show", line 63, in <module>
filename = getattr(b, options.generate)(options.relaxed).dumpf()
File "/usr/local/lib/python2.7/dist-packages/blueprint/frontend/sh.py", line 333, in dumpf
f.write('{0}\n'.format(out))
File "/usr/lib/python2.7/codecs.py", line 691, in write
return self.writer.write(data)
File "/usr/lib/python2.7/codecs.py", line 351, in write
data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 8256: ordinal not in range(128)
Installed using pip on Ubuntu 12.04.4 LTS x64.
same here ::
blueprint show -S my-first-blueprint
Traceback (most recent call last):
File "/usr/local/bin/blueprint-show", line 63, in
This fixes it:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
line 7 of blueprint-apply (and presumably blueprint-show too)
Still happens on Ubuntu 14.04
Editing /usr/local/bin/blueprint-show
with recommendation from @alasdaircr helps!
+1 Is this project still alive - haven't seen any P/R merged for years now.
I added the following to blueprint/frontend/sh.py
and was able to generate the shell manifest:
18 import sys
19
20 reload(sys)
21 sys.setdefaultencoding('utf8')
This fixes it:
import sys reload(sys) sys.setdefaultencoding("utf-8")
line 7 of blueprint-apply (and presumably blueprint-show too)
I used your code, but the terminal shows "NameError: name 'reload' is not defined", why ?
Cloned from repo master, Ubuntu 13.04 LTE x64. Couldn't find the source of this error. The other issues about the same thing did not happen at all, since I don't have any latin-1 folder names.