gpt4 book ai didi

python - 尝试使用 whisper-merge 时出现错误 "TypeError: ' NoneType' object is not iterable"

转载 作者:行者123 更新时间:2023-11-28 20:22:04 27 4
gpt4 key购买 nike

我正在尝试使用 whisper-merge合并 2 个 wsp 文件。他们有相同的保留策略,一个只是拥有比另一个更旧的数据。

当我运行 whisper-merge oldfile.wsp newfile.wsp 时出现此错误

Traceback (most recent call last):
File "/usr/local/src/whisper-0.9.12/bin/whisper-merge.py", line 32, in <module>
whisper.merge(path_from, path_to)
File "/usr/local/lib/python2.7/dist-packages/whisper.py", line 821, in merge
(timeInfo, values) = fetch(path_from, fromTime, untilTime)
TypeError: 'NoneType' object is not iterable

有什么想法吗?

这是 2 个文件的元数据输出:

最佳答案

whisper.py 中的第 812 行因包含多个存档的文件而中断。 https://github.com/graphite-project/whisper/blob/0.9.12/whisper.py#L812

fromTime = int(time.time()) - headerFrom['maxRetention']

要修复,紧接着第 813 行,根据存档保留分配 fromTime。 https://github.com/graphite-project/whisper/blob/0.9.12/whisper.py#L813

for archive in archives: # this line already exists
fromTime = int(time.time()) - archive['retention'] # add this line

关于python - 尝试使用 whisper-merge 时出现错误 "TypeError: ' NoneType' object is not iterable",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25030467/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com