python使用rrdtool时 argument 0 must be string的问题

在updatev rrdfile时,

ret = rrdtool.updatev(filename, ds)

报了argument 0 must be string的异常,经查是因为python 的rrdtool不是用unicode,而传递进来的参数使用了unicode,解决办法很简单

ret = rrdtool.updatev(filename.encode(), ds.encode())
原文地址:https://www.cnblogs.com/lovemyspring/p/4023731.html