gpt4 book ai didi

python - 权限错误 : [WinError 5] Access is denied python using moviepy to write gif

转载 作者:IT老高 更新时间:2023-10-28 22:12:25 25 4
gpt4 key购买 nike

我使用的是 Windows 8.1 64 位

我的代码

import pdb
from moviepy.editor import *

clip = VideoFileClip(".\\a.mp4")
clip.write_gif('.\\aasda.gif')

异常发生在 write_gif 方法

Traceback (most recent call last):
File "C:\abi\youtubetogif_project\test.py", line 5, in <module>
clip.write_gif('G:\\abi\\aasda.gif')
File "<string>", line 2, in write_gif
File "C:\Python34\lib\site-packages\moviepy-0.2.1.8.12-py3.4.egg\moviepy\decorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:\Python34\lib\site-packages\moviepy-0.2.1.8.12-py3.4.egg\moviepy\video\VideoClip.py", line 435, in write_gif
dispose= dispose, colors=colors)
File "<string>", line 2, in write_gif
File "C:\Python34\lib\site-packages\moviepy-0.2.1.8.12-py3.4.egg\moviepy\decorators.py", line 49, in requires_duration
return f(clip, *a, **k)
File "C:\Python34\lib\site-packages\moviepy-0.2.1.8.12-py3.4.egg\moviepy\video\io\gif_writers.py", line 186, in write_gif
stdout=sp.PIPE)
File "C:\Python34\lib\subprocess.py", line 848, in __init__
restore_signals, start_new_session)
File "C:\Python34\lib\subprocess.py", line 1104, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied

我将脚本移动到另一个文件夹和分区,以管理员身份运行moviepy依赖项和python,关闭UAC仍然给我错误

最佳答案

我也遇到过这种情况,解决方法通常是确保以管理员身份运行程序(右键,以管理员身份运行。)

关于python - 权限错误 : [WinError 5] Access is denied python using moviepy to write gif,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26091530/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com