CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

PermissionError: [WinError 5] Access is denied

Open ghost opened this issue 10 years ago • 5 comments

I ran the below code that was in the tutorial and I get the error below:

Code:

import cntk as C print(C.version)

with C.LocalExecutionContext('demo', clean_up=False) as ctx: a = C.constant([[1,2], [3,4]]) i = C.input_numpy([[[10,20], [30, 40]]]) print(ctx.eval(a + i))

Error:

File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 845, in runfile execfile(filename, namespace)

File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 103, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/jerinsh244/Dropbox/projects/ML/cntk_test.py", line 7, in print(ctx.eval(a + i))

File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\cntk\context.py", line 762, in eval action_name = action_name)

File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\site-packages\cntk\context.py", line 423, in _call_cntk stderr=subprocess.STDOUT)

File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\subprocess.py", line 607, in check_output with Popen(_popenargs, stdout=PIPE, *_kwargs) as process:

File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\subprocess.py", line 859, in init restore_signals, start_new_session)

File "C:\Users\jerinsh244\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\lib\subprocess.py", line 1114, in _execute_child startupinfo)

PermissionError: [WinError 5] Access is denied

ghost avatar Sep 01 '16 01:09 ghost

The code leaves a cntk config file in a new folder in the directory of the script. If I run the config file separately using 'cntk configFile=eval.cntk' using the command prompt, I get the desired output.

I was trying out CNTK using the python API

ghost avatar Sep 01 '16 01:09 ghost

With the Python API I get the same error with the tutorial: WindowsError: [Error 5] Access is denied

fcivardi avatar Sep 01 '16 08:09 fcivardi

You should do the next: CNTK_EXECUTABLE_PATH -> T:\cntk\ CNTK.exe

alexionby avatar Sep 06 '16 11:09 alexionby

Ah... Thanks a lot... I had added the directory 'T:\cntk' instead of the file to CNTK_EXECUTABLE_PATH.

It works now.

ghost avatar Sep 06 '16 14:09 ghost

Closing the issue...

ghost avatar Sep 06 '16 14:09 ghost