On Tue, Jun 08, 2010 at 02:26:18PM +0530, Anand Balachandran Pillai wrote: > On Tue, Jun 8, 2010 at 2:17 PM, Senthil Kumaran <orsent...@gmail.com> wrote: > > > On Tue, Jun 08, 2010 at 12:04:38PM +0530, Anand Balachandran Pillai wrote: > > > > >>>import tarfile > > > > >>>tarfile.open("*.tar.gz","r:gz") > > > > > ImportError: No module named zlib > > > > > > I agree that the error message could be more > > > descriptive. In this case looks like the tarfile module is masking > > > the original error message which is a failure to import zlib module. > > > > Really? ImportError: No module named zlib is fine enough to say that > > you don't have zlib installed. (I am talking in general and not for > > OP's purpose). What could be a better error message here? > > > > Please read the entire thread. You joined the thread later. > Refer to the first message by OP and you will understand what > I am talking here.
Okay, I get what you are referring to. Namely, the ReadError which was raising initially when doing just a tarfile.open() could have thrown in a Exception about zlib. Sridhar did mention it in passing, but we did not see any Exception in the Traceback. Yes, I think, those fine-grained exception in the traceback should help, it is not already present. -- Senthil Deus criou poucas cabecas perfeitas. As restantes cobriu com cabelo. _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers