Skip to content

shutil.copyfileobj error continued from previous issue (this can be closed) #102357

@jschwar313

Description

@jschwar313

Bug report

This is continued from issue #96721

I had this happen again. I have a script that's copying a file from my F drive to my C drive. Below is what I received using python 3.11.2:

2023-02-28 05:00:31,156 - aws_copy_backups - [INFO] - backup filename is F:\My Backups\New System Backup\\C_VOL-b047.spf
2023-02-28 05:08:55,071 - aws_copy_backups - [INFO] - file F:\My Backups\New System Backup\\C_VOL-b047.spf is closed
Traceback (most recent call last):
File "startup.py", line 139, in run
File "console.py", line 18, in run
File "aws_copy_backups_main.py", line 433, in
File "aws_copy_backups_main.py", line 393, in main
File "shutil.py", line 213, in copyfileobj
OSError: [WinError 433] Invalid argument

I googled WinError 433 and it sounds like that external drive was disconnected, so that solves the puzzle. Thanks for putting the code mentioned in the previous post in python 3.11.2 shutil.py. I don't have to copy it anymore. I appreciate that. I thought I bumped the hard drive, but it happened early in the morning and I'm not sure I did. Maybe I need to buy a new external drive if this keeps happening. Thanks so much for the help.

So this is just an FYI.

Your environment

  • CPython versions tested on:
  • Operating system and architecture: Windows 10 64-bit fully updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions