473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Strange IO Error when extracting zips to a network location

Hi,
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 extractzips.py <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
path...

When running the script as follows

python extractzips.py \\backupserver\backupshare\machine\folder d:\unziphere

the script works perfectly, but if I do

python extractzips.py \\backupserver\backupshare\machine\folder
\\anetworkmachine\share\folder

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

File "extractzips.py", line 41, in zipextract
outfile.write(zip.read(x))
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.

Hari
May 17 '06 #1
1 1749
Hari Sekhon wrote:
Hi,
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 extractzips.py <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
path...

When running the script as follows

python extractzips.py \\backupserver\backupshare\machine\folder d:\unziphere

the script works perfectly, but if I do

python extractzips.py \\backupserver\backupshare\machine\folder
\\anetworkmachine\share\folder

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

File "extractzips.py", line 41, in zipextract
outfile.write(zip.read(x))
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 looks like
http://support.microsoft.com/default...b;en-us;899149 is the
answer.

May 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Colin Brown | last post by:
As I am getting a larger collection of python program packages the idea of saving them as zips is becoming increasingly attractive. The latest idea is to launch them from a generic wrapper listed...
1
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
6
by: Andrew Edwards | last post by:
I have program that downloads a file from the internet and extracts it using calls to system(). All files are extracted into the directory where my program is located. How do I redirect the...
8
by: Ondine | last post by:
Hi I have a client running an Access 2000 database on a small network with 3 pc's. Two of the laptop pcs have a data replica, which they use when not connected to the network, the 'server'...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
2
by: Buddy Ackerman | last post by:
I have a web app that I have setup on numerous web servers. I've set one up for a new client at their hosting facility and cannot get it to connect to their database. I get a "SQL Server does not...
8
by: Kevin D. | last post by:
Please note, I already posted this on the MySQL official forum, but received no response. I thought I'd try again in another location. My apologies to anyone reading this twice... Despite...
1
by: m3zmeriz3d | last post by:
i typed a function to enter data into a file to be recalled later, now i have done something here and as soon as this function begins it skips the first 'zips' getline and makes it a blank space and...
25
by: Andy_Khosravi | last post by:
I just recently changed my database that I'm running from a monolithic DB to a split FE/BE. The front end resides on the client machine and the BE resides on a network drive. I'm experimenting with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.