Error Msg: "The wrong volume is in the drive."
Mark Hammond
MarkH at ActiveState.com
Thu Nov 9 22:26:43 EST 2000
taashlo at sandia.gov wrote:
> Hi all,
>
> I'm using Python 1.5.2 on Windows NT. I'm trying to split a file
> (TmpArcFile) across multiple floppy disks. The code below works fine
> the first time through, it is the second time it runs the
> "PrjArcFile = open(PrjArcSerialName, "wb")" line that it opens an
> error dialog titled "python.exe" that says "The wrong volume is in the
> drive. Please insert volume into A:." and then has 'Abort', 'Retry',
> 'Ignore' buttons.
>
> I could understand this behavior if the file being written to the
> floppy hadn't been closed before the disk change, but it had.
I have no idea - but check out the MS documentation for the
"SetErrorMode" function - it is exposed in win32api. It should be
possible to suppress the dialog. The symptoms imply that if you do
this, your second open will fail - but if you retry manually in the
code, it will work again!?
No idea really - but this function may prevent you from getting the
dialog and allow you to around the problem if you can't find the _real_
answer ;-)
Mark.
More information about the Python-list
mailing list