Strange IO Error when extracting zips to a network location

Hari Sekhon harisekhon at
Wed May 17 11:50:41 CEST 2006

   I've written a script to run on windows to extract all zips under a 
given directory path to another directory path as such:

python <fetch all zips under this dir> <put all extracted 
files under this dir>

The purpose of this script is to retrieve backup files which are 
individually zipped under a backup directory tree on a backup server.

This scripts works nicely and has input validation etc, exiting 
gracefully and telling you if you gave a non existent start or target 

When running the script as follows

python \\backupserver\backupshare\machine\folder d:\unziphere

the script works perfectly, but if I do

python \\backupserver\backupshare\machine\folder 

then it unzips a lot of files, recreating the directory tree as it goes 
but eventually fails with the traceback:

  File "", line 41, in zipextract
IOError: [Errno 22] Invalid argument

But I'm sure the code is correct and the argument is passed properly, 
otherwise a hundred files before it wouldn't have extracted successfully 
using this exact same piece of code (it loops over it). It always fails 
on this same file every time. When I extract the same tree to my local 
drive it works fine without error.

I have no idea why pushing to a network share causes an IO Error, 
shouldn't it be the same as extracting locally from our perspective?

It pulls fine, why doesn't it push fine?

Thanks for any help or suggestions anybody can give me.


More information about the Python-list mailing list