Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change os.rename to shutil.move #951

Merged
merged 1 commit into from
Mar 21, 2023
Merged

Change os.rename to shutil.move #951

merged 1 commit into from
Mar 21, 2023

Conversation

cliu72
Copy link
Contributor

@cliu72 cliu72 commented Mar 21, 2023

If you haven't already, please read through our contributing guidelines before opening your PR

What is the purpose of this PR?

Apparently Windows doesn't like it when you try to os.rename something that is an "open process" (causing pixel clustering functions to fail). After much experimenting, seems like the fix is easy. shutil.move seems to do the trick.

How did you implement your changes

Change os.rename to shutil.move. Tested on my computer, Ben's, and MIBIAN.

Remaining issues

None

Copy link
Contributor

@alex-l-kong alex-l-kong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@cliu72 cliu72 added this pull request to the merge queue Mar 21, 2023
@cliu72 cliu72 merged commit e06838f into main Mar 21, 2023
@cliu72 cliu72 deleted the pc_osrename_fix branch March 21, 2023 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants