Python 属性错误:';模块';对象没有属性';医生

Python 属性错误:';模块';对象没有属性';医生,python,python-2.7,ipython,Python,Python 2.7,Ipython,我是一名初学者,尝试使用python编程对系统动态模型进行建模。问题是,当我尝试打印sd模型的组件时,错误消息如下所示: "AttributeError: 'module' object has no attribute 'doc'" 我的代码: import pysd educationmodel = pysd.read_vensim('Education.mdl') print educationmodel.components.doc() 据git repo所知,d

我是一名初学者,尝试使用python编程对系统动态模型进行建模。问题是,当我尝试打印sd模型的组件时,错误消息如下所示:

"AttributeError: 'module' object has no attribute 'doc'"
我的代码:

import pysd    

educationmodel = pysd.read_vensim('Education.mdl')     
print educationmodel.components.doc()

据git repo所知,
doc()
方法在
类PySD
中。另外,
read\u vensim
返回此类的实例


因此,如果您直接使用
educationmodel.doc()

,您的问题应该会得到解决,这可能是我的错-我必须将
.doc()
函数移到模型对象而不是组件对象,以便正确地包含Vensim宏。如果仍然存在问题,可能需要更新到最新版本(0.7.4)。如果这也没有帮助,那么我们可能必须解决一些问题

我运行了代码,但仍然出现错误:“AttributeError:'PySD'对象没有属性'doc'”,但我尝试通过以下方式更改代码:print educationmodel.components,输出结果如下:runfile('C:/Users/STUDENT/.spyder2/education sd.py',wdir='C:/Users/STUDENT/.spyder2')重新加载的模块:147073311549。你能给我解释一下吗