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\mac hine\folder d:\unziphere
the script works perfectly, but if I do
python extractzips.py \\backupserver\ backupshare\mac hine\folder
\\anetworkmachi ne\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(z ip.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 1 1768
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\mac hine\folder d:\unziphere
the script works perfectly, but if I do
python extractzips.py \\backupserver\ backupshare\mac hine\folder \\anetworkmachi ne\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(z ip.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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 below. I have chosen to set the
default directory to the location of the zipfile because I usually have an
associated configuration inifile alongside.
Periodically the topic of program protection crops up. Some zip applications
allow password...
|
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 that says:
'There was a problem retrieving printer information for this object.
The object may have been sent to a printer that was unavailable.'
When I choose 'report wizard', I can go through all of the steps but
then I get an error message...
|
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 extracted files to a specified
directory?
I can use the following:
system("move *.* c:\directory");
However, this will move my program. I end up having to call system for every
|
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' being the 3rd
machine.
The other day they reported that 'suddenly' a whole load of data that
they had entered (on to the 'server' main data) that day had
'disappeared'. Not only had the new data gone, but updates performed
|
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 questions are below...
"David Good" wrote:
> We have a network running both Win2k and Win2k3 webservers and our web sites
> reside on a UNC network share that happens to be a Network Appliance NAS.
| |
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 exist or access denied." error. Well, the
strangeness is that I have a SQL Query tool installed on this server and can connect to the database fine using the
exact same connection parameters that I have specified in my web app. Even more strange...
|
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 everything I've tried, I cannot get MySQL to start as a Windows
service. However, I AM able to get it started via the mysqld-nt --console
command.
Here is my (funky) setup:
|
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 goes directly to 'city' - someone please tell me what the hell happenned here - g'day - mark
void addData()
{
string zips = "";
string city = "";
ofstream outFile;
|
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 a utility
developed by Tony Toews to handle the distribution and subsequent
updates of the software. I'm having some trouble with the overall
upgrade process I've implemented, and I'm hoping one of you may have
an idea how to go about fixing...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |