sourcery-ai / sourcery

Instant AI code reviews
https://sourcery.ai
MIT License
1.5k stars 65 forks source link

OSError: [Errno 9] Bad file descriptor when running review --fix #378

Closed rob101 closed 10 months ago

rob101 commented 10 months ago

Checklist

Description

When I try to run Sourcery, I get an OSError: [Errno 9] Bad file descriptor. This error occurs when the tool attempts to write to a file. I expected the program to run without any file-related errors.

Code snippet that reproduces issue

N/A (The issue is not directly related to a specific piece of Python code.)

C:\Users\[user]\Documents\GitHub\[project]\.venv\Scripts\sourcery.exe review --fix C:\Users\[user]\Documents\GitHub\[project]\src

Debug Information

bm424 commented 10 months ago

Hi @rob101, thanks for reporting this. I'll take a look later this week.

bm424 commented 10 months ago

Hi @rob101, I've checked this over and there doesn't appear to be a general bug with sourcery review --fix or writing to files in our binary. I suspect the problem is specific to your system (maybe file permissions?). I'm closing this issue for now, but please do send an email to support@sourcery.ai and we can try to troubleshoot.