[issue23453] Opening a stream with tarfile.open() triggers a TypeError: can't concat bytes to str error

2016-02-09 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23453] Opening a stream with tarfile.open() triggers a TypeError: can't concat bytes to str error

2015-02-12 Thread Martin Panter
Martin Panter added the comment: Using fileobj=sys.stdin.buffer instead should do the trick. The “tarfile” module would expect a binary stream, not a text stream. Given the documentation currently says, “Use this variant in combination with e.g. sys.stdin, . . .”, I presume that is why you wer

[issue23453] Opening a stream with tarfile.open() triggers a TypeError: can't concat bytes to str error

2015-02-12 Thread Carl Chenet
New submission from Carl Chenet: I'm trying to use a tar stream to a Python tarfile object but each time I do have a TypeError: can't concat bytes to str error Here is my test: -8<- #!/usr/bin/python3.4 import tarfile import sys tarobj = tarfile.open(mode='r|', fileobj=sys.stdin) pri