nbmanager
nbmanager copied to clipboard
Access is denied on Windows
On Windows, I get a PermissionError "Access is denied":
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\nbmanager-0.1-py3.5.egg\nbmanager\gui.py", line 148, in shutdown
File "C:\Anaconda3\lib\site-packages\nbmanager-0.1-py3.5.egg\nbmanager\api.py", line 71, in shutdown
PermissionError: [WinError 5] Access is denied
I tried running the shell as Administrator but get the same problem.
The app crashes as a result of this.
That line uses os.kill() to send a signal to a process. The Python docs have some pretty big caveats about os.kill() on Windows, so I guess we'd need something else, but I don't really know what.
I get the same error. Will try to find a work around.
Traceback (most recent call last):
File "c:\gits\nbmanager\nbmanager\gui.py", line 148, in shutdown
server.shutdown(wait=False)
File "c:\gits\nbmanager\nbmanager\api.py", line 76, in shutdown
os.kill(self.pid, signal.SIGTERM)
PermissionError: [WinError 5] Access is denied
Using
os.system("taskkill /F /pid "+str(self.pid))
is an ugly hack but does the trick...
Want to make a PR?
Sure, that's an easy one:)