pyecharts 保存图片报错

  1. 编译环境,使用的新版edge,谷歌内核的浏览器, 安装的anaconda,使用notebook。 2.保存图片时候报错如下 This event loop is already running C:\ProgramData\Anaconda3\lib\site-packages\pyee\_compat.py:36: DeprecationWarning: pyee.EventEmitter is deprecated and will be removed in a future major version; you should instead use either pyee.AsyncIOEventEmitter, pyee.TwistedEventEmitter, pyee.ExecutorEventEmitter, pyee.TrioEventEmitter, or pyee.BaseEventEmitter. 'pyee.EventEmitter is deprecated and will be removed in a future ' 3.网络搜索,加入代码 import nest_asyncio nest_asyncio.apply() 报错
C:\ProgramData\Anaconda3\lib\site-packages\pyecharts\charts\chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)
  super().__init__(init_opts=init_opts)
C:\ProgramData\Anaconda3\lib\site-packages\pyee\_compat.py:36: DeprecationWarning: pyee.EventEmitter is deprecated and will be removed in a future major version; you should instead use either pyee.AsyncIOEventEmitter, pyee.TwistedEventEmitter, pyee.ExecutorEventEmitter, pyee.TrioEventEmitter, or pyee.BaseEventEmitter.
  'pyee.EventEmitter is deprecated and will be removed in a future '

4.源码

from pyecharts.render import make_snapshot
from snapshot_pyppeteer import snapshot
import nest_asyncio
nest_asyncio.apply()
make_snapshot(snapshot,'全国市场需求.html','全国市场需求.png',notebookte=True)

https://www.lizenghai.com/archives/31997.html