A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/aws/aws-encryption-sdk-python/issues/75 below:

Can't pass an object with read() to StreamDecryptor · Issue #75 · aws/aws-encryption-sdk-python · GitHub

So now I'm trying to download an encrypted file, and I figured I'd pipe it through the StreamDecryptor. But when I try this, I get back

TypeError: 'StreamingBody' does not have the buffer interface

I suspect this is because in def prep_stream_data(data): (L138:internal/utils/__init__.py), my file like object is checked with isinstance(data, (file, io.IOBase, six.StringIO)). But my object is a botocore StreamingBody, which doesn't inherit from any of these. So my object gets passed to io.BytesIO and dies because it's a stream and not a buffer.

I'm not sure what this check is specifically requiring, it might be nicer to check for specific methods -- I expected anything with read() to work here.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4