Python->Pyecharts->Geo在地图中加入自定义的点报错:AttributeError: 'NoneType' object has no attribute 'add'。

Geo在地图中加入自定义的点报错:
AttributeError: 'NoneType' object has no attribute 'add'

原码:

from example.commons import Faker
from pyecharts import options as opts
from pyecharts.charts import Geo
from pyecharts.globals import ChartType, SymbolType
import pandas as pd
import json


# 链式调用
c = (
    Geo()
        .add_schema(maptype="world")
        # 加入自定义的点,格式为
        .add_coordinate("测试点", 116.39770014211535, 39.90779994986951)
        # 为自定义的点添加属性
        .add("geo", [("测试点", 51)])
        .set_series_opts(label_opts=opts.LabelOpts(is_show=False))
        .set_global_opts(title_opts=opts.TitleOpts(title="宇宙中心呼唤爱"))
)
# 在 html(浏览器) 中渲染图表
c.render()
# 在 Jupyter Notebook 中渲染图表
c.render_notebook()

报错:

.add_coordinate("测试点", 116.39770014211535, 39.90779994986951)

AttributeError: 'NoneType' object has no attribute 'add'

我也想知道怎么解决,同问。

这个解决了吗?同求

我的什么也没改,重新运行,就可以了