可捕获的致命错误:类MysqliDb的对象无法转换为字符串

时间:2015-12-14 12:19:39

标签: php mysqli php-mysqlidb

我一直收到这个错误,即使我在这里阅读了一些有关此错误的解决方案,我也尝试了它们,但我仍然遇到此错误。让我通知你,我正在使用joshcam / PHP-MySQLi-Database-Class。

以下是代码:

myList = [26, None, None, None, 31, None, None, 58, None, 42, None, None, None, 79]
resultList = [None] * len(myList)

for i in range(len(myList):
    if not myList[i] is None:
        resultList[i] = myList[i]
    else:
        distance = [i - j for j in range(len(myList)) if not myList[j] is None]
        neighbors = min([n for n in dist if n>0]), max([n for n in dist if n<0])
        # rest of the interpolation (not important for my question):
        neighbors_c = [(1/float(n))**2 for n in neighbors]
        c_sum = sum(neighbors_c)
        neighbors_c = [n/c_sum for n in neighbors_c]
        resultList = myList[i-neighbors[0]]*neighbors_c[0] + myList[i-neighbors[1]]*neighbors_c[1]

请帮我解决此错误。 在此先感谢

0 个答案:

没有答案