python rrdtool尝试除rrdtool。错误模块对象没有属性错误
我有这段代码,它在Linux上给出了这个错误,如果您能提供帮助,我将不胜感激
选择 | 换行 | 行号
- import rrdtool
- try:
- ret_asd = rrdtool.update(myfile.rrd,'N:%s:%s' %(metric1, metric2));
- except rrdtool.error, e:
- print e
当我运行上面的程序时,我得到以下错误
选择 | 换行 | 行号
- except rrdtool.error, e:
- AttributeError: 'module' object has no attribute 'error'
该代码旨在跳过以下错误
选择 | 换行 | 行号
- illegal attempt to update using time 1363358441 when last update time is 1363358441 (minimum one second step)
如果你能帮我找到解决方案,我将不胜感激谢谢