Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'NoneType' object is not iterable #9

Open
bingdidi opened this issue Oct 14, 2022 · 4 comments
Open

TypeError: 'NoneType' object is not iterable #9

bingdidi opened this issue Oct 14, 2022 · 4 comments

Comments

@bingdidi
Copy link

bingdidi commented Oct 14, 2022

这是怎么回事呢,我用的是CICflow2019数据集的pcap文件
是在下述语句出错的:
for packet in packets:
key = (packet[0], packet[1], packet[2])
# Add packet to flow
result[key] = result.get(key, Flow()).add(packet,extention)
是说packets是空值,也就是说pcap文件读取没有成功,不知该如何解决

@bingdidi bingdidi changed the title OSError: tshark is not installed or added to environment path. TypeError: 'NoneType' object is not iterable Oct 15, 2022
@bingdidi
Copy link
Author

我用po主给的pcap数据集就可以运行成功,但用其他数据集就会出现问题

@jmhIcoding
Copy link
Owner

我用这个flowcontainer完成了多个流量分类项目,flowcontainer没有任何问题。
你自己好好查查吧,是不是路径没写对,或者pcap中不含tcp/udp流,都是icmp,arp等数据包。

@1195986182
Copy link

我用这个flowcontainer完成了多个流量分类项目,flowcontainer没有任何问题。 你自己好好查查吧,是不是路径没写对,或者pcap中不含tcp/udp流,都是icmp,arp等数据包。
我运行的示例代码,出现了同样的问题,而且有一个Running Error : tshark parse error : 'setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (6007, 11) + inhomogeneous part.'.
warnings.warn("Running Error : tshark parse error : '{0}'."
请问这是为什么?

@jmhIcoding
Copy link
Owner

我用这个flowcontainer完成了多个流量分类项目,flowcontainer没有任何问题。 你自己好好查查吧,是不是路径没写对,或者pcap中不含tcp/udp流,都是icmp,arp等数据包。
我运行的示例代码,出现了同样的问题,而且有一个Running Error : tshark parse error : 'setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (6007, 11) + inhomogeneous part.'.
warnings.warn("Running Error : tshark parse error : '{0}'."
请问这是为什么?

把numpy降低或者更新最新版的flowcontainer==6.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants