<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">It looks like what’s happening here is that calling ZipFile.read() returns <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">bytes</code> instead of a file-like object. To work around this, create an instance of <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">BytesIO</code> from the result of <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">z.read()</code>, and pass that object to <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">Entrez.parse</code>. <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">BytesIO</code> converts an in-memory byte string into a file-like object which supports the interface the parser expects.</p>
<div title="MDH:SXQgbG9va3MgbGlrZSB3aGF0J3MgaGFwcGVuaW5nIGhlcmUgaXMgdGhhdCBjYWxsaW5nIFppcEZp
bGUucmVhZCgpIHJldHVybnMgYGJ5dGVzYCBpbnN0ZWFkIG9mIGEgZmlsZS1saWtlIG9iamVjdC4g
VG8gd29yayBhcm91bmQgdGhpcywgY3JlYXRlIGFuIGluc3RhbmNlIG9mIGBCeXRlc0lPYCBmcm9t
IHRoZSByZXN1bHQgb2YgYHoucmVhZCgpYCwgYW5kIHBhc3MgdGhhdCBvYmplY3QgdG8gYEVudHJl
ei5wYXJzZWAuIGBCeXRlc0lPYCBjb252ZXJ0cyBhbiBpbi1tZW1vcnkgYnl0ZSBzdHJpbmcgaW50
byBhIGZpbGUtbGlrZSBvYmplY3Qgd2hpY2ggc3VwcG9ydHMgdGhlIGludGVyZmFjZSB0aGUgcGFy
c2VyIGV4cGVjdHMu" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 19, 2015 at 8:28 AM,  <span dir="ltr"><<a href="mailto:c.buhtz@posteo.jp" target="_blank">c.buhtz@posteo.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2015-12-19 13:55 <<a href="mailto:c.buhtz@posteo.jp">c.buhtz@posteo.jp</a>> wrote:<br>
> Traceback (most recent call last):<br>
>   File "<stdin>", line 1, in <module><br>
>   File "/usr/local/lib/python3.4/dist-packages/Bio/Entrez/Parser.py",<br>
> line 243, in parse text = handle.read(BLOCK)<br>
> AttributeError: 'bytes' object has no attribute 'read'<br>
<br>
</span>btw. When using zipfile.extractall() and then open these extracted<br>
files with mode 'rb' it workes.<br>
But I don't want to waste resource with storing unnecessary files to<br>
the filesystem.<br>
<div class="HOEnZb"><div class="h5">--<br>
GnuPGP-Key ID 0751A8EC<br>
_______________________________________________<br>
Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
</div></div></blockquote></div><br></div>