On python3 sys.stdin is an encoded file object that does not support reading raw binary data. Use the supplied buffer object to do so. Signed-off-by: Sven Wegener <sven.wegener@inovex.de> Co-authored-by: Sven Wegener <sven.wegener@inovex.de>