0

I am trying to run a Python script on Jenkins, and I get that error: The file have all the rights, any suggestion ?

ERROR:root:[WinError 5] Access is denied: 'D:\\JDM_WS\\s_3yZW\\Folder\\file.xlsm'
Traceback (most recent call last):
  File "C:\Users\MyUser\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 788, in move
    os.rename(src, real_dst)
PermissionError: [WinError 5] Access is denied: 'D:\\JDM_WS\\s_3yZW' -> 'D:\\JDM_WS\\w_3yZW\\Software'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\MyUser\AppData\Local\Jenkins\.jenkins\workspace\Jazz\Jobs\JazzJob\main.py", line 516, in main
    restructure_folder(src=case_src,
  File "C:\Users\MyUser\AppData\Local\Jenkins\.jenkins\workspace\Jazz\Jobs\JazzJob\main.py", line 176, in restructure_folder
    shutil.move(src=src, dst=dst)
  File "C:\Users\MyUser\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 800, in move
    rmtree(src)
  File "C:\Users\MyUser\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 737, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Users\MyUser\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 610, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Users\MyUser\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 615, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Users\MyUser\AppData\Local\Programs\Python\Python38\lib\shutil.py", line 613, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'D:\\JDM_WS\\s_3yZW\\Folder\\file.xlsm'
jps
  • 20,041
  • 15
  • 75
  • 79
  • Does this answer your question? [PermissionError: \[WinError 5\] Access is denied python using moviepy to write gif](https://stackoverflow.com/questions/26091530/permissionerror-winerror-5-access-is-denied-python-using-moviepy-to-write-gif) – Henry Woody Apr 26 '22 at 07:41
  • Hi, unfortunate no, I tried everything from the internet, I have a different problem I think. – Cosma Eduard Apr 26 '22 at 07:44

0 Answers0