Can't read unmom-datasets!
lucaskyle opened this issue · 5 comments
dear jamie:
when i implemented ur program, i found that i cound not read unmon-datasets.
maybe the .gz file contains the .DS_store file which can not be read well.
can u help me ?
while e < unmon_sites:
if e%500 == 0 and e>0:
print e
if os.path.exists(path_to_unmon + str(d)):
tcp_dump = open(path_to_unmon + str(d)).readlines()
g = []
g.append(RF_fextract.TOTAL_FEATURES(tcp_dump))
data_dict['unmonitored_feature'].append(g)
data_dict['unmonitored_label'].append((d))
d += 1
e += 1
else:
d += 1
Can you describe a little more what your issue is? I'm a little unclear
@jhayes14
hi jhayes14, I have a same problem as lucaskyle's one.
When I run the code, following error is occurred.
`
python k-FP.py --dictionary --mon_type alexa
...
28
29
30
Creating Unmonitored features...
`
I supporse that line112 doesn't work well.
When I print e every time in loop, the value of e is 0 anytime.
I found this problem with windows and ubuntu.
I just checked and reading unmon files in ubuntu and osx works fine for me. Are you putting them in the correct subdirectory before running the script?
Thanks, I managed this problem.
Probably I could not unzip correctly because downloaded file is 'unmonitored.tar.gz'.
I renamed to 'unmonitored.tar' and used tar xvf command.
This worked well, but I have new problem as following.
python k-FP.py --dictionary --mon_type alexa
...
86500
87000
87500
Traceback (most recent call last):
File "k-FP.py", line 378, in
dictionary_()
File "k-FP.py", line 115, in dictionary_
g.append(RF_fextract.TOTAL_FEATURES(tcp_dump))
File "path\to\k-FP-master\RF_fextract.py", line 266, in TOTAL_FEATURES
list_data = get_pkt_list(trace_data)
File "path\to\k-FP-master\RF_fextract.py", line 41, in get_pkt_list
if float(b[1]) > 0:
ValueError: could not convert string to float: %1.0
Then I print e everytime.
87515
87516
87517
87518
87519
Traceback (most recent call last):
File "k-FP.py", line 379, in
dictionary_()
File "k-FP.py", line 116, in dictionary_
g.append(RF_fextract.TOTAL_FEATURES(tcp_dump))
File "path\to\k-FP-master\RF_fextract.py", line 266, in TOTAL_FEATURES
list_data = get_pkt_list(trace_data)
File " path\to\k-FP-master\RF_fextract.py", line 41, in get_pkt_list
if float(b[1]) > 0:
ValueError: could not convert string to float: %1.0
somehow we fixed the problem. thx