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

按照你readme.md的步骤调试代码之后出现了一下问题,您能帮忙看一下吗?谢谢! #1

Closed
liangkai0088 opened this issue Feb 20, 2019 · 10 comments

Comments

@liangkai0088
Copy link

您好 !在github上看到关于deeppacket的代码 我下载了官网上的数据并对代码进行了调试了 ,首先是执行了prepro.py文件,我将数据集解压到了data文件夹下 按照您的步骤修改了代码 但是出现了一下错误,麻烦您能帮我看一下吗?我是一名研究生 十分感谢!!!
tim 20190220100655
错误提示如下:
(liangkai) [common@precious deeppacket]$ python prepro.py
Using TensorFlow backend.
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/common/anaconda2/envs/liangkai/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/home/common/anaconda2/envs/liangkai/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "prepro.py", line 78, in task
with open(os.path.join('data', tail+'.pickle'), 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'data/icq_chat_3a.pcap.pickle'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "prepro.py", line 108, in
res = pool.map(task, todo_list)
File "/home/common/anaconda2/envs/liangkai/lib/python3.6/multiprocessing/pool.py", line 266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/common/anaconda2/envs/liangkai/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
FileNotFoundError: [Errno 2] No such file or directory: 'data/icq_chat_3a.pcap.pickle'

@KimythAnly
Copy link
Owner

KimythAnly commented Feb 23, 2019 via email

@KimythAnly
Copy link
Owner

您好

錯誤內容是說沒有找到data/icq_chat_3a.pcap.pickle檔,請問您的資料夾相對位置有沒有設置正確呢?可能是沒有找到data這個資料夾,請您先新增這個資料夾再試試看!

@liangkai0088
Copy link
Author

你好
我已经按照代码更改了文件相对位置路径,但是官网中的数据集中并没有.pickle文件,只有.pcap和.pcapng文件

@KimythAnly
Copy link
Owner

照理來說那段代碼是在生成 .pickle 文件的,所以你並不需要有 .pickle 文件,他是在生成的時候出錯
請問你有 "precious deeppacket/data" 這個資料夾嗎?

@spacelover1
Copy link

spacelover1 commented Dec 22, 2019

Hello there,
I have got the same error and I have checked the relative path, it is correct. I do not know what is the problem.
git

I also have another question, I am working with the same dataset and I need to convert these pcap files to binary sequence, in order to use these sequences to compute entropy, can I use the pickle files for this purpose?

@liangkai0088
Copy link
Author

Hello, I just opened my email and saw this problem. I solved this problem in three steps:
The first step is to install all third-party dependencies in accordance with the requirements in readme.md. This is important.
The second step, that problem occurred at that time, it seems that it is a problem of multi-threading and files are not found. I added the code to determine the exception to the tool file util.py file. As shown in the photo.
The third step is to configure the path where the vpn-nonvpn file is stored and the path where the pickle file is to be generated.
Just fine

Yes, but I think that if you want to calculate the entropy for the data, I think it is best to use numpy to convert pickle to a calculation matrix before performing the calculation. The above is my suggestion

I'm sorry to reply to you so late, I'm writing a dissertation recently
TIM图片20191223185841

@liangkai0088
Copy link
Author

Hello there,
I have got the same error and I have checked the relative path, it is correct. I do not know what is the problem.
git

I also have another question, I am working with the same dataset and I need to convert these pcap files to binary sequence, in order to use these sequences to compute entropy, can I use the pickle files for this purpose?

Hello, I just opened my email and saw this problem. I solved this problem in three steps:
The first step is to install all third-party dependencies in accordance with the requirements in readme.md. This is important.
The second step, that problem occurred at that time, it seems that it is a problem of multi-threading and files are not found. I added the code to determine the exception to the tool file util.py file. As shown in the photo.
The third step is to configure the path where the vpn-nonvpn file is stored and the path where the pickle file is to be generated.
Just fine

Yes, but I think that if you want to calculate the entropy for the data, I think it is best to use numpy to convert pickle to a calculation matrix before performing the calculation. The above is my suggestion

I'm sorry to reply to you so late, I'm writing a dissertation recently
TIM图片20191223185841

@spacelover1
Copy link

Thanks a lot, you were right, the problem was that there was no folder for the pickle files to be generated, so I added a folder named "data", and it worked.

Yes, but I think that if you want to calculate the entropy for the data, I think it is best to use numpy to convert pickle to a calculation matrix before performing the calculation. The above is my suggestion

I didn't get exactly what you mean by "calculation matrix"?
So I ran this code with one of the pcap files and I got two pickle files:
"email1b.pcap.pickle" , "email1b.pcap_class.pickle"
Do you have any ideas how I should deal with these files?

@liangkai0088
Copy link
Author

The file has a pickle file converted to a Packet Bytes Matrix by numpy,E.g. X_train or X_test .You can take a look after the output. It may be better to find the sequence of X_train to calculate the entropy. The above is only my opinion. If there is something wrong, please point out that I am a Chinese and English is not my native language, so my expression may Not very accurate, you can use Google Translate to translate into Chinese or English to see. Thank you

@liangkai0088
Copy link
Author

Thanks a lot, you were right, the problem was that there was no folder for the pickle files to be generated, so I added a folder named "data", and it worked.

Yes, but I think that if you want to calculate the entropy for the data, I think it is best to use numpy to convert pickle to a calculation matrix before performing the calculation. The above is my suggestion

I didn't get exactly what you mean by "calculation matrix"?
So I ran this code with one of the pcap files and I got two pickle files:
"email1b.pcap.pickle" , "email1b.pcap_class.pickle"
Do you have any ideas how I should deal with these files?

The file has a pickle file converted to a Packet Bytes Matrix by numpy,E.g. X_train or X_test .You can take a look after the output. It may be better to find the sequence of X_train to calculate the entropy. The above is only my opinion. If there is something wrong, please point out that I am a Chinese and English is not my native language, so my expression may Not very accurate, you can use Google Translate to translate into Chinese or English to see. Thank you

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