试图为简单的机场图重现dbfiddle的此代码段。但是出现以下错误:
ValueError:
Invalid value of type 'plotly.graph_objs.Scattergeo' received for the 'data' property of
Received value: Scattergeo({
'lat': array([41.979595 , 33.64044444, 32.89595056, ..., 43.90882639, 34.681499 ,
45.8076625 ]),
'lon': array([ -87.90446417, -84.42694444, -97.0372 , ..., -92.49798722,
-90.348816 , -108.5428611 ]),
'mode': 'markers',
'text': array(["Chicago O'Hare InternationalChicago, ILArrivals: 25129",
'William B Hartsfield-Atlanta IntlAtlanta, GAArrivals: 21925',
'Dallas-Fort Worth InternationalDallas-Fort Worth, TXArrivals: 20662',
..., 'Rochester InternationalRochester, MNArrivals: 37',
'Tunica Municipal AirportTunica, MSArrivals: 32',
'Billings Logan IntlBillings, MTArrivals: 23'], dtype=object)
})
The 'data' property is a tuple of trace instances
that may be specified as:
- A list or tuple of trace instances
(e.g. [Scatter(...), Bar(...)])
- A list or tuple of dicts of string/value properties where:
- The 'type' property specifies the trace type
One of: ['area', 'bar', 'barpolar', 'box',
'candlestick', 'carpet', 'choropleth', 'cone',
'contour', 'contourcarpet', 'funnel',
'funnelarea', 'heatmap', 'heatmapgl',
'histogram', 'histogram2d',
'histogram2dcontour', 'isosurface', 'mesh3d',
'ohlc', 'parcats', 'parcoords', 'pie',
'pointcloud', 'sankey', 'scatter',
'scatter3d', 'scattercarpet', 'scattergeo',
'scattergl', 'scattermapbox', 'scatterpolar',
'scatterpolargl', 'scatterternary', 'splom',
'streamtube', 'sunburst', 'surface', 'table',
'violin', 'volume', 'waterfall']
- All remaining properties are passed to the constructor of
the specified trace type
(e.g. [{'type': 'scatter', ...}, {'type': 'bar, ...}])
不知道此错误来自何处?有什么建议吗?