Open sanguiyh opened 1 year ago
First I installed pygraphviz module on my system. Then I changed the graph_extraction function in ImageGeneration.py file as follows:: This helped solve my issue. You can try and see if it helps in your case.
Missing modules in the code will not throw an exception, but directly return null. It is recommended to comment the branch statement and then check the error content.
ckh123@ubuntu:~/Desktop/VulCNN-main$ python3 ImageGeneration.py -i /home/ckh123/Desktop/VulCNN-main/pdgs111/Vul -o /home/ckh123/Desktop/VulCNN-main/outputs1/Vul -m /home/ckh123/Desktop/VulCNN-main/data_model/data_model.bin CVE_raw_000062516_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_01_bad CVE_raw_000062522_CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_07_bad CVE_raw_000062517_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_02_bad CVE_raw_000062521_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_06_bad CVE_raw_000062520_CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_05_bad CVE_raw_000062523_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_08_bad CVE_raw_000062518_CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_03_bad "7" [label = <(METHOD,FUN1)1> ] ^ Expected graph_stmt, found '[' (at char 23), (line:2, col:5) "7" [label = <(METHOD,FUN1)1> ] ^ Expected graph_stmt, found '[' (at char 23), (line:2, col:5) "7" [label = <(METHOD,FUN1)1> ] ^ Expected graph_stmt, found '[' (at char 23), (line:2, col:5) "7" [label = <(METHOD,FUN1)1> ] "7" [label = <(METHOD,FUN1)1> ] ^ Expected graph_stmt, found '[' (at char 23), (line:2, col:5) "7" [label = <(METHOD,FUN1)1> ] ^ Expected graph_stmt, found '[' (at char 23), (line:2, col:5) ^ Expected graph_stmt, found '[' (at char 23), (line:2, col:5) "7" [label = <(METHOD,FUN1)1> ] ^ Expected graph_stmt, found '[' (at char 23), (line:2, col:5) 这是我的报错,有人能帮我解决吗,谢谢
ckh123@ubuntu:~/Desktop/VulCNN-main$ python3 ImageGeneration.py -i /home/ckh123/Desktop/VulCNN-main/pdgs111/Vul -o /home/ckh123/Desktop/VulCNN-main/outputs1/Vul -m /home/ckh123/Desktop/VulCNN-main/data_model/data_model.bin CVE_raw_000062516_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_01_bad CVE_raw_000062522_CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_07_badCVE_raw_000062517_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_02_bad CVE_raw_000062521_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_06_bad CVE_raw_000062520_CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_05_bad CVE_raw_000062523_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_08_bad CVE_raw_000062518_CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_03_坏 “7” [label = <(METHOD,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23 处), (line:2, col:5) “7” [label = <(METHOD,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23 处), (line:2, col:5) “7” [label = <(METHOD,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23 处), (line:2, col:5) “7” [label = <(METHOD,FUN1)1> ]“7” [标签 = <(方法,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23 处), (line:2, col:5) “7” [label = <(METHOD,FUN1)1> ] ^预期graph_stmt,找到 '[' (在字符 23 处), (行:2, 列:5) ^ 预期graph_stmt,找到 '[' (在字符 23处), (行:2, 列:5) “7” [标签 = <(方法,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23),(line:2, col:5) 这是我的报错,有人能帮我解决吗,谢谢
ckh123@ubuntu:~/Desktop/VulCNN-main$ python3 ImageGeneration.py -i /home/ckh123/Desktop/VulCNN-main/pdgs111/Vul -o /home/ckh123/Desktop/VulCNN-main/outputs1/Vul -m /home/ckh123/Desktop/VulCNN-main/data_model/data_model.bin CVE_raw_000062516_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_01_bad CVE_raw_000062522_CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_07_badCVE_raw_000062517_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_02_bad CVE_raw_000062521_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_06_bad CVE_raw_000062520_CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_05_bad CVE_raw_000062523_CWE121_Stack_Based_Buffer_OverflowCWE129_connect_socket_08_bad CVE_raw_000062518_CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_03_坏 “7” [label = <(METHOD,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23 处), (line:2, col:5) “7” [label = <(METHOD,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23 处), (line:2, col:5) “7” [label = <(METHOD,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23 处), (line:2, col:5) “7” [label = <(METHOD,FUN1)1> ]“7” [标签 = <(方法,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23 处), (line:2, col:5) “7” [label = <(METHOD,FUN1)1> ] ^预期graph_stmt,找到 '[' (在字符 23 处), (行:2, 列:5) ^ 预期graph_stmt,找到 '[' (在字符 23处), (行:2, 列:5) “7” [标签 = <(方法,FUN1)1> ] ^预期graph_stmt,找到 '[' (在 char 23),(line:2, col:5) 这是我的报错,有人能帮我解决吗,谢谢
请问您解决了吗
I'm stuck on part 4 and can't generate images with pdg The dot file was generated earlier, and sent2vec can also be run.
I wonder if the author has made the same error. When the image is generated, only the file name is printed out, and the expect branch is entered, and degree_channel, closeness_channel, katz_channel are not generated