我使用Windows 8.1 64位否認蟒蛇PermissionError:[WinError 5]使用Access的moviepy寫GIF
我的代碼
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仍然給我錯誤
linux是我的答案呢? – 2014-09-29 02:37:08
Python在Windows上運行良好,並且已有多年。我想我們可能需要更多關於VideoFileClip類試圖做什麼的信息。在創建子進程時似乎打破了。所以我認爲它更多的是與你正在寫新文件的文件夾/分區相關。例如,它試圖啓動的子進程是什麼?它試圖從哪裏啓動? – otherchirps 2014-09-29 04:10:42
您是否按照[影片文檔](http://zulko.github.io/moviepy/install.html#linking-to-imagemagick)指示「Windows用戶在手動安裝MoviePy之前進入影片/conf.py文件並提供名爲convert的ImageMagick二進制文件的路徑「? – cgohlke 2014-09-29 04:56:57