Error entire text
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[14], line 25
21 anim = animation.FuncAnimation(fig, animate, init_func=init,
22 frames=FRAMES, interval=100)
24 # call our new function to display the animation
---> 25 display_animation(anim)
Cell In[13], line 3, in display_animation(anim)
1 def display_animation(anim):
2 plt.close(anim._fig)
----> 3 return HTML(anim_to_html(anim))
Cell In[10], line 9, in anim_to_html(anim)
7 if not hasattr(anim, '_encoded_video'):
8 f = NamedTemporaryFile(suffix='.mp4', delete=False)
----> 9 anim.save(f.name, fps=20, extra_args=['-vcodec', 'libx264', '-pix_fmt', 'yuv420p'])
10 f.flush()
11 video = open(f.name, "rb").read()
File C:\ProgramData\anaconda3\envs\ML\lib\site-packages\matplotlib\animation.py:1051, in Animation.save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs, progress_callback)
1048 writer_cls = PillowWriter # Always available.
1049 _log.warning("MovieWriter %s unavailable; using Pillow "
1050 "instead.", writer)
-> 1051 writer = writer_cls(fps, **writer_kwargs)
1052 _log.info('Animation.save using %s', type(writer))
1054 if 'bbox_inches' in savefig_kwargs:
TypeError: __init__() got an unexpected keyword argument 'extra_args'
To solve above problem, Installing ffmpeg by
conda install -c conda-forge av
on CMD
'둘 > [ Python ]' 카테고리의 다른 글
[Colab] library 설치 시, 조용히 설치 (0) | 2024.12.13 |
---|---|
pip list 업데이트 가능한 항목 확인 (0) | 2024.12.13 |
[Pandas] DataFrame Row & Column Limitation (0) | 2023.05.08 |
Handling "inf", "-inf" in Python (0) | 2022.07.12 |
Layer ModuleWrapper has arguments in `__init__` and therefore must override `get_config` (0) | 2022.07.05 |