You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug/feature
Kapitan refs fail to correctly encode binary files, while it works ok with text files
To Reproduce
Steps to reproduce the behavior:
kapitan refs --write base64:binary/binary -t echo-server --base64 -f /usr/bin/true
Traceback (most recent call last):
File "/usr/local/bin/kapitan", line 8, in <module>
sys.exit(main())
File "/Users/ademaria/Library/Python/3.9/lib/python/site-packages/kapitan/cli.py", line 562, in main
args.func(args)
File "/Users/ademaria/Library/Python/3.9/lib/python/site-packages/kapitan/refs/cmd_parser.py", line 27, in handle_refs_command
ref_write(args, ref_controller)
File "/Users/ademaria/Library/Python/3.9/lib/python/site-packages/kapitan/refs/cmd_parser.py", line 50, in ref_write
data = fp.read()
File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 0: invalid continuation byte
Expected behavior
Binary is correctly encoded.
Screenshots
If applicable, add screenshots to help explain your problem/idea.
** If it's a bug (please complete the following information):**
python3 --version: Python 3.9.7
pip3 --version: pip 21.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
Describe the bug/feature
Kapitan refs fail to correctly encode binary files, while it works ok with text files
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Binary is correctly encoded.
Screenshots
If applicable, add screenshots to help explain your problem/idea.
** If it's a bug (please complete the following information):**
python3 --version
: Python 3.9.7pip3 --version
: pip 21.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)Are you using pyenv or virtualenv?
noAdditional context
Related to work for kapicorp/kapitan-reference#106
WORKAROUND
Simply encode the file before importing. i.e.:
The text was updated successfully, but these errors were encountered: