graph.write_pdf(“iris.pdf”) AttributeError: 'list' object has no attribute 'write_pdf'
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My code is follow the class of machine learning of google.The two code are same.I don't know why it show error.May be the type of variable is error.But google's code is same to me.Who has ever had this problem? This is error [0 1 2] [0 1 2] Traceback (most recent call last): File "/media/joyce/oreo/python/machine_learn/VisualizingADecisionTree.py", line 34, in <module> graph.write_pdf("iris.pdf") AttributeError: 'list' object has no attribute 'write_pdf' [Finished in 0.4s with exit code 1] [shell_cmd: python -u "/media/joyce/oreo/python