I'm trying to reproduce your preprocessing of the UGR'16 csv file.
My goal is to obtain the same type of *.csv that you provide in stan_data/ugr16_demo.csv.
For this, I have downloaded the 3rd week of April in the UGR'16 dataset, and I have modified the stannetflow/analyze_functions.py according to my emplacement of both the file april.week3.csv.uniqblacklistremoved and the file spam_flows_cut.csv.
When I try to run python3 preprocess.py in terminal, I get a creation of a certain number of blocks, but after that I obtain an error on the line 12 of preprocess.py:
user_list = config['DEFAULT']['userlist'].split(',')
This line give me the following error:
KeyError: 'userlist'
This is the complete output from the python3 preprocess.py command.
Visit the following url to download april_week3.csv
https://nesg.ugr.es/nesg-ugr16/april_week3.php
blockNum 1 with 999037
blockNum 2 with 999007
blockNum 3 with 999248
blockNum 4 with 999164
blockNum 5 with 998866
blockNum 6 with 998544
blockNum 7 with 998766
blockNum 8 with 998760
blockNum 9 with 998587
blockNum 10 with 999285
blockNum 11 with 999342
blockNum 12 with 999236
blockNum 13 with 998897
blockNum 14 with 998568
blockNum 15 with 998999
blockNum 16 with 999054
blockNum 17 with 999165
blockNum 18 with 999300
blockNum 19 with 999336
blockNum 20 with 999311
blockNum 21 with 999257
blockNum 22 with 999286
blockNum 23 with 999465
blockNum 24 with 999611
blockNum 25 with 999554
blockNum 26 with 999570
blockNum 27 with 999564
blockNum 28 with 999608
blockNum 29 with 999651
blockNum 30 with 999406
blockNum 31 with 999549
blockNum 32 with 999516
blockNum 33 with 999479
blockNum 34 with 999645
blockNum 35 with 999346
blockNum 36 with 999613
blockNum 37 with 999505
blockNum 38 with 999548
blockNum 39 with 999436
blockNum 40 with 999150
blockNum 41 with 999109
blockNum 42 with 999281
blockNum 43 with 998876
blockNum 44 with 998151
blockNum 45 with 998382
blockNum 46 with 998339
blockNum 47 with 998126
blockNum 48 with 998262
blockNum 49 with 998421
blockNum 50 with 998590
blockNum 51 with 998756
blockNum 52 with 998787
blockNum 53 with 998592
blockNum 54 with 998097
blockNum 55 with 998330
blockNum 56 with 997705
blockNum 57 with 998297
blockNum 58 with 998743
blockNum 59 with 998582
blockNum 60 with 998230
blockNum 61 with 998492
blockNum 62 with 998331
blockNum 63 with 998438
blockNum 64 with 998831
blockNum 65 with 999173
blockNum 66 with 998781
blockNum 67 with 998838
blockNum 68 with 998726
blockNum 69 with 998582
blockNum 70 with 998626
blockNum 71 with 998648
blockNum 72 with 998621
blockNum 73 with 998535
blockNum 74 with 998628
blockNum 75 with 998910
blockNum 76 with 998610
blockNum 77 with 998731
blockNum 78 with 998890
blockNum 79 with 999054
blockNum 80 with 998568
blockNum 81 with 998174
blockNum 82 with 997905
blockNum 83 with 998310
blockNum 84 with 998309
blockNum 85 with 998516
blockNum 86 with 998035
blockNum 87 with 998435
blockNum 88 with 998206
blockNum 89 with 998240
blockNum 90 with 998305
blockNum 91 with 998636
blockNum 92 with 997593
blockNum 93 with 996899
blockNum 94 with 998621
blockNum 95 with 998452
blockNum 96 with 998525
blockNum 97 with 998654
blockNum 98 with 999085
blockNum 99 with 998911
blockNum 100 with 999014
blockNum 101 with 998877
blockNum 102 with 998676
blockNum 103 with 998714
blockNum 104 with 998652
blockNum 105 with 998744
blockNum 106 with 998898
blockNum 107 with 998820
blockNum 108 with 998925
blockNum 109 with 998659
blockNum 110 with 998591
blockNum 111 with 998911
blockNum 112 with 998864
blockNum 113 with 998902
blockNum 114 with 998554
blockNum 115 with 998579
blockNum 116 with 998457
blockNum 117 with 998673
blockNum 118 with 998416
blockNum 119 with 998123
blockNum 120 with 997760
blockNum 121 with 998345
blockNum 122 with 998851
blockNum 123 with 998542
blockNum 124 with 998332
blockNum 125 with 998977
blockNum 126 with 999225
blockNum 127 with 999515
blockNum 128 with 999196
blockNum 129 with 999149
blockNum 130 with 999070
blockNum 131 with 998516
blockNum 132 with 998546
blockNum 133 with 997998
blockNum 134 with 997637
blockNum 135 with 998148
blockNum 136 with 998307
blockNum 137 with 998579
blockNum 138 with 998560
blockNum 139 with 998698
blockNum 140 with 998159
blockNum 141 with 999049
blockNum 142 with 998388
blockNum 143 with 998130
blockNum 144 with 997992
blockNum 145 with 997987
blockNum 146 with 998367
blockNum 147 with 997947
blockNum 148 with 997674
blockNum 149 with 998020
blockNum 150 with 998003
blockNum 151 with 997571
blockNum 152 with 997815
blockNum 153 with 997791
blockNum 154 with 636227
most bi-direction traffic users [(21113098, '42.219.156.211'), (20712441, '42.219.156.231'), (8006954, '42.219.153.191'), (6463978, '42.219.159.95'), (5691996, '42.219.155.28'), (4591194, '42.219.159.85'), (4256629, '42.219.153.62'), (3480839, '42.219.158.156'), (2896611, '42.219.155.56'), (2763365, '42.219.153.89'), (2748536, '42.219.153.7'), (2337073, '42.219.155.26'), (2286615, '42.219.159.194'), (2232025, '42.219.159.92'), (2179889, '42.219.152.249'), (1867730, '42.219.159.82'), (1779469, '42.219.159.94'), (1287814, '42.219.158.226'), (1250228, '42.219.154.107'), (1237597, '42.219.153.128')]
4 categories count: both sent&recieve, only sent to ex, only recieve from ex, interal-to-internal
[695, 0, 3401, 292]
process time 323
Traceback (most recent call last):
File "/home/aschoen/Documents/stan/stannetflow/preprocess.py", line 47, in
user_selection()
File "/home/aschoen/Documents/stan/stannetflow/preprocess.py", line 12, in user_selection
user_list = config['DEFAULT']['userlist'].split(',')
File "/home/aschoen/miniconda3/lib/python3.9/configparser.py", line 1257, in getitem
raise KeyError(key)
KeyError: 'userlist'
Hello.
I'm trying to reproduce your preprocessing of the UGR'16 csv file.
My goal is to obtain the same type of *.csv that you provide in stan_data/ugr16_demo.csv.
For this, I have downloaded the 3rd week of April in the UGR'16 dataset, and I have modified the stannetflow/analyze_functions.py according to my emplacement of both the file april.week3.csv.uniqblacklistremoved and the file spam_flows_cut.csv.
When I try to run
python3 preprocess.py
in terminal, I get a creation of a certain number of blocks, but after that I obtain an error on the line 12 of preprocess.py:user_list = config['DEFAULT']['userlist'].split(',')
This line give me the following error:
KeyError: 'userlist'
This is the complete output from the
python3 preprocess.py
command.Visit the following url to download april_week3.csv https://nesg.ugr.es/nesg-ugr16/april_week3.php blockNum 1 with 999037 blockNum 2 with 999007 blockNum 3 with 999248 blockNum 4 with 999164 blockNum 5 with 998866 blockNum 6 with 998544 blockNum 7 with 998766 blockNum 8 with 998760 blockNum 9 with 998587 blockNum 10 with 999285 blockNum 11 with 999342 blockNum 12 with 999236 blockNum 13 with 998897 blockNum 14 with 998568 blockNum 15 with 998999 blockNum 16 with 999054 blockNum 17 with 999165 blockNum 18 with 999300 blockNum 19 with 999336 blockNum 20 with 999311 blockNum 21 with 999257 blockNum 22 with 999286 blockNum 23 with 999465 blockNum 24 with 999611 blockNum 25 with 999554 blockNum 26 with 999570 blockNum 27 with 999564 blockNum 28 with 999608 blockNum 29 with 999651 blockNum 30 with 999406 blockNum 31 with 999549 blockNum 32 with 999516 blockNum 33 with 999479 blockNum 34 with 999645 blockNum 35 with 999346 blockNum 36 with 999613 blockNum 37 with 999505 blockNum 38 with 999548 blockNum 39 with 999436 blockNum 40 with 999150 blockNum 41 with 999109 blockNum 42 with 999281 blockNum 43 with 998876 blockNum 44 with 998151 blockNum 45 with 998382 blockNum 46 with 998339 blockNum 47 with 998126 blockNum 48 with 998262 blockNum 49 with 998421 blockNum 50 with 998590 blockNum 51 with 998756 blockNum 52 with 998787 blockNum 53 with 998592 blockNum 54 with 998097 blockNum 55 with 998330 blockNum 56 with 997705 blockNum 57 with 998297 blockNum 58 with 998743 blockNum 59 with 998582 blockNum 60 with 998230 blockNum 61 with 998492 blockNum 62 with 998331 blockNum 63 with 998438 blockNum 64 with 998831 blockNum 65 with 999173 blockNum 66 with 998781 blockNum 67 with 998838 blockNum 68 with 998726 blockNum 69 with 998582 blockNum 70 with 998626 blockNum 71 with 998648 blockNum 72 with 998621 blockNum 73 with 998535 blockNum 74 with 998628 blockNum 75 with 998910 blockNum 76 with 998610 blockNum 77 with 998731 blockNum 78 with 998890 blockNum 79 with 999054 blockNum 80 with 998568 blockNum 81 with 998174 blockNum 82 with 997905 blockNum 83 with 998310 blockNum 84 with 998309 blockNum 85 with 998516 blockNum 86 with 998035 blockNum 87 with 998435 blockNum 88 with 998206 blockNum 89 with 998240 blockNum 90 with 998305 blockNum 91 with 998636 blockNum 92 with 997593 blockNum 93 with 996899 blockNum 94 with 998621 blockNum 95 with 998452 blockNum 96 with 998525 blockNum 97 with 998654 blockNum 98 with 999085 blockNum 99 with 998911 blockNum 100 with 999014 blockNum 101 with 998877 blockNum 102 with 998676 blockNum 103 with 998714 blockNum 104 with 998652 blockNum 105 with 998744 blockNum 106 with 998898 blockNum 107 with 998820 blockNum 108 with 998925 blockNum 109 with 998659 blockNum 110 with 998591 blockNum 111 with 998911 blockNum 112 with 998864 blockNum 113 with 998902 blockNum 114 with 998554 blockNum 115 with 998579 blockNum 116 with 998457 blockNum 117 with 998673 blockNum 118 with 998416 blockNum 119 with 998123 blockNum 120 with 997760 blockNum 121 with 998345 blockNum 122 with 998851 blockNum 123 with 998542 blockNum 124 with 998332 blockNum 125 with 998977 blockNum 126 with 999225 blockNum 127 with 999515 blockNum 128 with 999196 blockNum 129 with 999149 blockNum 130 with 999070 blockNum 131 with 998516 blockNum 132 with 998546 blockNum 133 with 997998 blockNum 134 with 997637 blockNum 135 with 998148 blockNum 136 with 998307 blockNum 137 with 998579 blockNum 138 with 998560 blockNum 139 with 998698 blockNum 140 with 998159 blockNum 141 with 999049 blockNum 142 with 998388 blockNum 143 with 998130 blockNum 144 with 997992 blockNum 145 with 997987 blockNum 146 with 998367 blockNum 147 with 997947 blockNum 148 with 997674 blockNum 149 with 998020 blockNum 150 with 998003 blockNum 151 with 997571 blockNum 152 with 997815 blockNum 153 with 997791 blockNum 154 with 636227 most bi-direction traffic users [(21113098, '42.219.156.211'), (20712441, '42.219.156.231'), (8006954, '42.219.153.191'), (6463978, '42.219.159.95'), (5691996, '42.219.155.28'), (4591194, '42.219.159.85'), (4256629, '42.219.153.62'), (3480839, '42.219.158.156'), (2896611, '42.219.155.56'), (2763365, '42.219.153.89'), (2748536, '42.219.153.7'), (2337073, '42.219.155.26'), (2286615, '42.219.159.194'), (2232025, '42.219.159.92'), (2179889, '42.219.152.249'), (1867730, '42.219.159.82'), (1779469, '42.219.159.94'), (1287814, '42.219.158.226'), (1250228, '42.219.154.107'), (1237597, '42.219.153.128')] 4 categories count: both sent&recieve, only sent to ex, only recieve from ex, interal-to-internal [695, 0, 3401, 292] process time 323 Traceback (most recent call last): File "/home/aschoen/Documents/stan/stannetflow/preprocess.py", line 47, in
user_selection()
File "/home/aschoen/Documents/stan/stannetflow/preprocess.py", line 12, in user_selection
user_list = config['DEFAULT']['userlist'].split(',')
File "/home/aschoen/miniconda3/lib/python3.9/configparser.py", line 1257, in getitem
raise KeyError(key)
KeyError: 'userlist'
Thank you in advance.