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

WindowsError: [Error 5] Access is denied #56

Open
Saw-mon-and-Natalie opened this issue Jul 29, 2017 · 1 comment
Open

WindowsError: [Error 5] Access is denied #56

Saw-mon-and-Natalie opened this issue Jul 29, 2017 · 1 comment

Comments

@Saw-mon-and-Natalie
Copy link

Saw-mon-and-Natalie commented Jul 29, 2017

I get this error from ffedc.py:

  File "C:\Python27\lib\site-packages\audioread\ffdec.py", line 279, in __exit__
    self.close()
  File "C:\Python27\lib\site-packages\audioread\ffdec.py", line 263, in close
    self.proc.kill()
  File "C:\Python27\lib\subprocess.py", line 1002, in terminate
    _subprocess.TerminateProcess(self._handle, 1)
WindowsError: [Error 5] Access is denied

I've been searching how to resolve it and found this on stackoverflow:
https://stackoverflow.com/questions/17076679/windowserror-access-is-denied-on-calling-process-terminate

But even trying this try-catch trick doesn't work when I modify ffdec.py.
Looks like issue might be related to this:
https://stackoverflow.com/questions/5573257/windowserror-error-5-access-is-denied-when-trying-to-kill-a-subprocess-pytho

But still don't know how to resolve. I tried running my code with admin privileges too and I have all the permissions to modify my file.

@sampsyo
Copy link
Member

sampsyo commented Jul 31, 2017

Thanks for the report! This sounds related to #51, although that one is in the context of WSL.

I don't have a lot to offer because I don't have a Windows machine to test on, but it might be the case that this happens when the process has already exited. Catching the exception and ignoring it would then be OK. Could you please open a PR with the try/catch addition you tried so we can take a look?

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

No branches or pull requests

2 participants