Yep. That is the problem. Figured it out from both sides of the equation.<div><br></div><div>As of Python 2.7.1 and 3.2, the BZ2File object type does not support reading multi-stream bz2 files, like those generated by pbzip2.</div>
<div><br></div><div>I'm going to have to look into another solution.</div><div><br></div><div>-Eric</div><div><br></div><div>-=--=---=----=----=---=--=-=--=---=----=---=--=-=-<br>Eric B. Wolf                           720-334-7734<br>
<br><br><br>
<br><br><div class="gmail_quote">On Tue, Mar 1, 2011 at 3:06 PM, Christian Vetter <span dir="ltr"><<a href="mailto:veaac.fdirct@gmail.com">veaac.fdirct@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Tue, Mar 1, 2011 at 10:54 PM, Eric Wolf <<a href="mailto:ebwolf@gmail.com">ebwolf@gmail.com</a>> wrote:<br>
> Has anyone tried reading the bz2 compressed planet file?<br>
> I'm currently trying to figure out if there is something wrong in Python's<br>
> bz2 module, zlib, or the planet files themselves.<br>
> The python BZ2file module lets you read and write bz2 files like normal<br>
> files without decompressing the whole thing. This is key, especially when<br>
> dealing with full-planet which is 500GB+ uncompressed. However, I've found a<br>
> few instances where different people have had issues with the OSM planet<br>
> files and the bz2 module quitting after reading the first 900,000 bytes. Has<br>
> anyone had success with this?<br>
> FYI: The script works perfectly with a 165MB compressed file from Cloudmade.<br>
> -Eric<br>
> -=--=---=----=----=---=--=-=--=---=----=---=--=-=-<br>
> Eric B. Wolf                           720-334-7734<br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> dev mailing list<br>
> <a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
> <a href="http://lists.openstreetmap.org/listinfo/dev" target="_blank">http://lists.openstreetmap.org/listinfo/dev</a><br>
><br>
><br>
<br>
Most likely the module does not handle multi-stream bz2 files on<br>
itself. These files are created by parallel packing programs and if<br>
the module does not handle them correctly it will stop after the end<br>
of the first stream. I would take a look into the documentation<br>
whether it says anything about unpacking multi-stream archives and how<br>
you have to initialize the next stream.<br>
<br>
Greetings,<br>
<font color="#888888"><br>
Christian Vetter<br>
</font></blockquote></div><br></div>