PermissionError: [WinError 5] Access is denied python using moviepy to write gif
I'm using windows 8.1 64 bit
my code
import pdb
from moviepy.editor import *
clip = VideoFileClip(".\a.mp4")
clip.write_gif('.\aasda.gif')
the exception is at write_gif method
Traceback (most recent call last):
File "C:abiyoutubetogif_projecttest.py", line 5, in <module>
clip.write_gif('G:\abi\aasda.gif')
File "<string>", line 2, in write_gif
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepydecorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepyvideoVideoClip.py", line 435, in write_gif
dispose= dispose, colors=colors)
File "<string>", line 2, in write_gif
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepydecorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepyvideoiogif_writers.py", line 186, in write_gif
stdout=sp.PIPE)
File "C:Python34libsubprocess.py", line 848, in __init__
restore_signals, start_new_session)
File "C:Python34libsubprocess.py", line 1104, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied
I moved the script to another folder and partition, running moviepy dependancies and python as admin, turning off UAC still gives me error
python windows
add a comment |
I'm using windows 8.1 64 bit
my code
import pdb
from moviepy.editor import *
clip = VideoFileClip(".\a.mp4")
clip.write_gif('.\aasda.gif')
the exception is at write_gif method
Traceback (most recent call last):
File "C:abiyoutubetogif_projecttest.py", line 5, in <module>
clip.write_gif('G:\abi\aasda.gif')
File "<string>", line 2, in write_gif
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepydecorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepyvideoVideoClip.py", line 435, in write_gif
dispose= dispose, colors=colors)
File "<string>", line 2, in write_gif
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepydecorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepyvideoiogif_writers.py", line 186, in write_gif
stdout=sp.PIPE)
File "C:Python34libsubprocess.py", line 848, in __init__
restore_signals, start_new_session)
File "C:Python34libsubprocess.py", line 1104, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied
I moved the script to another folder and partition, running moviepy dependancies and python as admin, turning off UAC still gives me error
python windows
Python works fine on windows, and has for years. I think we probably need more info about what the VideoFileClip class is trying to do. Seems to be breaking while creating a child process. So I think it's more to do with that, than the folder/partition you're writing the new file to. For example, what's the subprocess it's trying to launch? Where is it trying to launch that from?
– otherchirps
Sep 29 '14 at 4:10
2
Did you follow the documentation for moviepy, which instructs "Windows user, before installing MoviePy by hand, go into the moviepy/conf.py file and provide the path to the ImageMagick binary called convert"?
– cgohlke
Sep 29 '14 at 4:56
thanks.... I specified it without the .exe file
– Abirafdi Raditya Putra
Sep 29 '14 at 5:08
add a comment |
I'm using windows 8.1 64 bit
my code
import pdb
from moviepy.editor import *
clip = VideoFileClip(".\a.mp4")
clip.write_gif('.\aasda.gif')
the exception is at write_gif method
Traceback (most recent call last):
File "C:abiyoutubetogif_projecttest.py", line 5, in <module>
clip.write_gif('G:\abi\aasda.gif')
File "<string>", line 2, in write_gif
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepydecorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepyvideoVideoClip.py", line 435, in write_gif
dispose= dispose, colors=colors)
File "<string>", line 2, in write_gif
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepydecorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepyvideoiogif_writers.py", line 186, in write_gif
stdout=sp.PIPE)
File "C:Python34libsubprocess.py", line 848, in __init__
restore_signals, start_new_session)
File "C:Python34libsubprocess.py", line 1104, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied
I moved the script to another folder and partition, running moviepy dependancies and python as admin, turning off UAC still gives me error
python windows
I'm using windows 8.1 64 bit
my code
import pdb
from moviepy.editor import *
clip = VideoFileClip(".\a.mp4")
clip.write_gif('.\aasda.gif')
the exception is at write_gif method
Traceback (most recent call last):
File "C:abiyoutubetogif_projecttest.py", line 5, in <module>
clip.write_gif('G:\abi\aasda.gif')
File "<string>", line 2, in write_gif
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepydecorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepyvideoVideoClip.py", line 435, in write_gif
dispose= dispose, colors=colors)
File "<string>", line 2, in write_gif
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepydecorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:Python34libsite-packagesmoviepy-0.2.1.8.12-py3.4.eggmoviepyvideoiogif_writers.py", line 186, in write_gif
stdout=sp.PIPE)
File "C:Python34libsubprocess.py", line 848, in __init__
restore_signals, start_new_session)
File "C:Python34libsubprocess.py", line 1104, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied
I moved the script to another folder and partition, running moviepy dependancies and python as admin, turning off UAC still gives me error
python windows
python windows
asked Sep 29 '14 at 1:57
Abirafdi Raditya PutraAbirafdi Raditya Putra
1771314
1771314
Python works fine on windows, and has for years. I think we probably need more info about what the VideoFileClip class is trying to do. Seems to be breaking while creating a child process. So I think it's more to do with that, than the folder/partition you're writing the new file to. For example, what's the subprocess it's trying to launch? Where is it trying to launch that from?
– otherchirps
Sep 29 '14 at 4:10
2
Did you follow the documentation for moviepy, which instructs "Windows user, before installing MoviePy by hand, go into the moviepy/conf.py file and provide the path to the ImageMagick binary called convert"?
– cgohlke
Sep 29 '14 at 4:56
thanks.... I specified it without the .exe file
– Abirafdi Raditya Putra
Sep 29 '14 at 5:08
add a comment |
Python works fine on windows, and has for years. I think we probably need more info about what the VideoFileClip class is trying to do. Seems to be breaking while creating a child process. So I think it's more to do with that, than the folder/partition you're writing the new file to. For example, what's the subprocess it's trying to launch? Where is it trying to launch that from?
– otherchirps
Sep 29 '14 at 4:10
2
Did you follow the documentation for moviepy, which instructs "Windows user, before installing MoviePy by hand, go into the moviepy/conf.py file and provide the path to the ImageMagick binary called convert"?
– cgohlke
Sep 29 '14 at 4:56
thanks.... I specified it without the .exe file
– Abirafdi Raditya Putra
Sep 29 '14 at 5:08
Python works fine on windows, and has for years. I think we probably need more info about what the VideoFileClip class is trying to do. Seems to be breaking while creating a child process. So I think it's more to do with that, than the folder/partition you're writing the new file to. For example, what's the subprocess it's trying to launch? Where is it trying to launch that from?
– otherchirps
Sep 29 '14 at 4:10
Python works fine on windows, and has for years. I think we probably need more info about what the VideoFileClip class is trying to do. Seems to be breaking while creating a child process. So I think it's more to do with that, than the folder/partition you're writing the new file to. For example, what's the subprocess it's trying to launch? Where is it trying to launch that from?
– otherchirps
Sep 29 '14 at 4:10
2
2
Did you follow the documentation for moviepy, which instructs "Windows user, before installing MoviePy by hand, go into the moviepy/conf.py file and provide the path to the ImageMagick binary called convert"?
– cgohlke
Sep 29 '14 at 4:56
Did you follow the documentation for moviepy, which instructs "Windows user, before installing MoviePy by hand, go into the moviepy/conf.py file and provide the path to the ImageMagick binary called convert"?
– cgohlke
Sep 29 '14 at 4:56
thanks.... I specified it without the .exe file
– Abirafdi Raditya Putra
Sep 29 '14 at 5:08
thanks.... I specified it without the .exe file
– Abirafdi Raditya Putra
Sep 29 '14 at 5:08
add a comment |
4 Answers
4
active
oldest
votes
I've run into this as well, solution is usually to be sure to run the program as an administrator (right click, run as administrator.)
add a comment |
Sometimes it uccures when some installations are not completed correctly, process stucks and a file is still opened. So, when you try to run the installation again and the installation requires deleting, you see the observed error. In my case shut down python processes and Command Prompt utilization helped
add a comment |
Maybe you wrongly set permission on python3. For instance if for the file permission is set like
`os.chmod('spam.txt', 0777)` --> This will lead to SyntaxError
This syntax was used in Python2. Now if you change like:
os.chmod('spam.txt', 777)
--> This is still worst!! Your permission will be set wrongly since are not on "octal" but on decimal.
Afterwards you will get permission Error if you try for instance to remove the file:
PermissionError: [WinError 5] Access is denied:
Solution for python3 is quite easy:
os.chmod('spam.txt', 0o777)
--> The syntax is now ZERO and o "0o"
Hi Nir...that is wrong. For os.chmod --> Availability: Unix, Windows. For Python2 for instance: docs.python.org/2/library/os.html#os.chmod Note Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.
– Marco smdm
Jul 3 '18 at 12:11
add a comment |
I was having the exact same issue, with an Access Denied error that was raised from the subprocess module.
Turns out that this is a bug in Python. Fortunately for us, it has already been solved. Updating your Python to the latest version should fix the problem. For example, I was still on 2.7.3 on this machine, and updating to 2.7.9 solved it. But the bug also affected the 3.2 and 3.3 branches of Python.
The bug you linked is different, and only occurs when subprocess tries to terminate a process. The OP's problem (and my problem) is happening while it's trying to open the process.
– SPoage
May 4 '15 at 7:13
@SPoage: I don't know about that. For me it occurred while doing the exact same thing OP was trying to do, i.e. write a VideoFileClip with MoviePy. What are you trying to do, and with which Python version?
– Junuxx
May 4 '15 at 7:30
1
My case was a result of PEBKAC. I had left out a part of the path, and as a result I was trying to open a new subprocess on a directory. As it happens, that doesn't work. :)
– SPoage
May 4 '15 at 15:08
add a comment |
protected by Community♦ Nov 14 '18 at 17:15
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
I've run into this as well, solution is usually to be sure to run the program as an administrator (right click, run as administrator.)
add a comment |
I've run into this as well, solution is usually to be sure to run the program as an administrator (right click, run as administrator.)
add a comment |
I've run into this as well, solution is usually to be sure to run the program as an administrator (right click, run as administrator.)
I've run into this as well, solution is usually to be sure to run the program as an administrator (right click, run as administrator.)
answered Jan 6 '15 at 15:25
Reed JonesReed Jones
627817
627817
add a comment |
add a comment |
Sometimes it uccures when some installations are not completed correctly, process stucks and a file is still opened. So, when you try to run the installation again and the installation requires deleting, you see the observed error. In my case shut down python processes and Command Prompt utilization helped
add a comment |
Sometimes it uccures when some installations are not completed correctly, process stucks and a file is still opened. So, when you try to run the installation again and the installation requires deleting, you see the observed error. In my case shut down python processes and Command Prompt utilization helped
add a comment |
Sometimes it uccures when some installations are not completed correctly, process stucks and a file is still opened. So, when you try to run the installation again and the installation requires deleting, you see the observed error. In my case shut down python processes and Command Prompt utilization helped
Sometimes it uccures when some installations are not completed correctly, process stucks and a file is still opened. So, when you try to run the installation again and the installation requires deleting, you see the observed error. In my case shut down python processes and Command Prompt utilization helped
answered Dec 12 '16 at 18:32
OuuLinOuuLin
211
211
add a comment |
add a comment |
Maybe you wrongly set permission on python3. For instance if for the file permission is set like
`os.chmod('spam.txt', 0777)` --> This will lead to SyntaxError
This syntax was used in Python2. Now if you change like:
os.chmod('spam.txt', 777)
--> This is still worst!! Your permission will be set wrongly since are not on "octal" but on decimal.
Afterwards you will get permission Error if you try for instance to remove the file:
PermissionError: [WinError 5] Access is denied:
Solution for python3 is quite easy:
os.chmod('spam.txt', 0o777)
--> The syntax is now ZERO and o "0o"
Hi Nir...that is wrong. For os.chmod --> Availability: Unix, Windows. For Python2 for instance: docs.python.org/2/library/os.html#os.chmod Note Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.
– Marco smdm
Jul 3 '18 at 12:11
add a comment |
Maybe you wrongly set permission on python3. For instance if for the file permission is set like
`os.chmod('spam.txt', 0777)` --> This will lead to SyntaxError
This syntax was used in Python2. Now if you change like:
os.chmod('spam.txt', 777)
--> This is still worst!! Your permission will be set wrongly since are not on "octal" but on decimal.
Afterwards you will get permission Error if you try for instance to remove the file:
PermissionError: [WinError 5] Access is denied:
Solution for python3 is quite easy:
os.chmod('spam.txt', 0o777)
--> The syntax is now ZERO and o "0o"
Hi Nir...that is wrong. For os.chmod --> Availability: Unix, Windows. For Python2 for instance: docs.python.org/2/library/os.html#os.chmod Note Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.
– Marco smdm
Jul 3 '18 at 12:11
add a comment |
Maybe you wrongly set permission on python3. For instance if for the file permission is set like
`os.chmod('spam.txt', 0777)` --> This will lead to SyntaxError
This syntax was used in Python2. Now if you change like:
os.chmod('spam.txt', 777)
--> This is still worst!! Your permission will be set wrongly since are not on "octal" but on decimal.
Afterwards you will get permission Error if you try for instance to remove the file:
PermissionError: [WinError 5] Access is denied:
Solution for python3 is quite easy:
os.chmod('spam.txt', 0o777)
--> The syntax is now ZERO and o "0o"
Maybe you wrongly set permission on python3. For instance if for the file permission is set like
`os.chmod('spam.txt', 0777)` --> This will lead to SyntaxError
This syntax was used in Python2. Now if you change like:
os.chmod('spam.txt', 777)
--> This is still worst!! Your permission will be set wrongly since are not on "octal" but on decimal.
Afterwards you will get permission Error if you try for instance to remove the file:
PermissionError: [WinError 5] Access is denied:
Solution for python3 is quite easy:
os.chmod('spam.txt', 0o777)
--> The syntax is now ZERO and o "0o"
answered Apr 15 '15 at 13:14
Marco smdmMarco smdm
7081920
7081920
Hi Nir...that is wrong. For os.chmod --> Availability: Unix, Windows. For Python2 for instance: docs.python.org/2/library/os.html#os.chmod Note Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.
– Marco smdm
Jul 3 '18 at 12:11
add a comment |
Hi Nir...that is wrong. For os.chmod --> Availability: Unix, Windows. For Python2 for instance: docs.python.org/2/library/os.html#os.chmod Note Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.
– Marco smdm
Jul 3 '18 at 12:11
Hi Nir...that is wrong. For os.chmod --> Availability: Unix, Windows. For Python2 for instance: docs.python.org/2/library/os.html#os.chmod Note Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.
– Marco smdm
Jul 3 '18 at 12:11
Hi Nir...that is wrong. For os.chmod --> Availability: Unix, Windows. For Python2 for instance: docs.python.org/2/library/os.html#os.chmod Note Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.
– Marco smdm
Jul 3 '18 at 12:11
add a comment |
I was having the exact same issue, with an Access Denied error that was raised from the subprocess module.
Turns out that this is a bug in Python. Fortunately for us, it has already been solved. Updating your Python to the latest version should fix the problem. For example, I was still on 2.7.3 on this machine, and updating to 2.7.9 solved it. But the bug also affected the 3.2 and 3.3 branches of Python.
The bug you linked is different, and only occurs when subprocess tries to terminate a process. The OP's problem (and my problem) is happening while it's trying to open the process.
– SPoage
May 4 '15 at 7:13
@SPoage: I don't know about that. For me it occurred while doing the exact same thing OP was trying to do, i.e. write a VideoFileClip with MoviePy. What are you trying to do, and with which Python version?
– Junuxx
May 4 '15 at 7:30
1
My case was a result of PEBKAC. I had left out a part of the path, and as a result I was trying to open a new subprocess on a directory. As it happens, that doesn't work. :)
– SPoage
May 4 '15 at 15:08
add a comment |
I was having the exact same issue, with an Access Denied error that was raised from the subprocess module.
Turns out that this is a bug in Python. Fortunately for us, it has already been solved. Updating your Python to the latest version should fix the problem. For example, I was still on 2.7.3 on this machine, and updating to 2.7.9 solved it. But the bug also affected the 3.2 and 3.3 branches of Python.
The bug you linked is different, and only occurs when subprocess tries to terminate a process. The OP's problem (and my problem) is happening while it's trying to open the process.
– SPoage
May 4 '15 at 7:13
@SPoage: I don't know about that. For me it occurred while doing the exact same thing OP was trying to do, i.e. write a VideoFileClip with MoviePy. What are you trying to do, and with which Python version?
– Junuxx
May 4 '15 at 7:30
1
My case was a result of PEBKAC. I had left out a part of the path, and as a result I was trying to open a new subprocess on a directory. As it happens, that doesn't work. :)
– SPoage
May 4 '15 at 15:08
add a comment |
I was having the exact same issue, with an Access Denied error that was raised from the subprocess module.
Turns out that this is a bug in Python. Fortunately for us, it has already been solved. Updating your Python to the latest version should fix the problem. For example, I was still on 2.7.3 on this machine, and updating to 2.7.9 solved it. But the bug also affected the 3.2 and 3.3 branches of Python.
I was having the exact same issue, with an Access Denied error that was raised from the subprocess module.
Turns out that this is a bug in Python. Fortunately for us, it has already been solved. Updating your Python to the latest version should fix the problem. For example, I was still on 2.7.3 on this machine, and updating to 2.7.9 solved it. But the bug also affected the 3.2 and 3.3 branches of Python.
answered Jan 31 '15 at 4:51
JunuxxJunuxx
11.3k52959
11.3k52959
The bug you linked is different, and only occurs when subprocess tries to terminate a process. The OP's problem (and my problem) is happening while it's trying to open the process.
– SPoage
May 4 '15 at 7:13
@SPoage: I don't know about that. For me it occurred while doing the exact same thing OP was trying to do, i.e. write a VideoFileClip with MoviePy. What are you trying to do, and with which Python version?
– Junuxx
May 4 '15 at 7:30
1
My case was a result of PEBKAC. I had left out a part of the path, and as a result I was trying to open a new subprocess on a directory. As it happens, that doesn't work. :)
– SPoage
May 4 '15 at 15:08
add a comment |
The bug you linked is different, and only occurs when subprocess tries to terminate a process. The OP's problem (and my problem) is happening while it's trying to open the process.
– SPoage
May 4 '15 at 7:13
@SPoage: I don't know about that. For me it occurred while doing the exact same thing OP was trying to do, i.e. write a VideoFileClip with MoviePy. What are you trying to do, and with which Python version?
– Junuxx
May 4 '15 at 7:30
1
My case was a result of PEBKAC. I had left out a part of the path, and as a result I was trying to open a new subprocess on a directory. As it happens, that doesn't work. :)
– SPoage
May 4 '15 at 15:08
The bug you linked is different, and only occurs when subprocess tries to terminate a process. The OP's problem (and my problem) is happening while it's trying to open the process.
– SPoage
May 4 '15 at 7:13
The bug you linked is different, and only occurs when subprocess tries to terminate a process. The OP's problem (and my problem) is happening while it's trying to open the process.
– SPoage
May 4 '15 at 7:13
@SPoage: I don't know about that. For me it occurred while doing the exact same thing OP was trying to do, i.e. write a VideoFileClip with MoviePy. What are you trying to do, and with which Python version?
– Junuxx
May 4 '15 at 7:30
@SPoage: I don't know about that. For me it occurred while doing the exact same thing OP was trying to do, i.e. write a VideoFileClip with MoviePy. What are you trying to do, and with which Python version?
– Junuxx
May 4 '15 at 7:30
1
1
My case was a result of PEBKAC. I had left out a part of the path, and as a result I was trying to open a new subprocess on a directory. As it happens, that doesn't work. :)
– SPoage
May 4 '15 at 15:08
My case was a result of PEBKAC. I had left out a part of the path, and as a result I was trying to open a new subprocess on a directory. As it happens, that doesn't work. :)
– SPoage
May 4 '15 at 15:08
add a comment |
protected by Community♦ Nov 14 '18 at 17:15
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Python works fine on windows, and has for years. I think we probably need more info about what the VideoFileClip class is trying to do. Seems to be breaking while creating a child process. So I think it's more to do with that, than the folder/partition you're writing the new file to. For example, what's the subprocess it's trying to launch? Where is it trying to launch that from?
– otherchirps
Sep 29 '14 at 4:10
2
Did you follow the documentation for moviepy, which instructs "Windows user, before installing MoviePy by hand, go into the moviepy/conf.py file and provide the path to the ImageMagick binary called convert"?
– cgohlke
Sep 29 '14 at 4:56
thanks.... I specified it without the .exe file
– Abirafdi Raditya Putra
Sep 29 '14 at 5:08