Closed sayalijangam closed 5 years ago
Which version of Python are you using?
On Wed, Jan 23, 2019, 11:57 AM sayalijangam <notifications@github.com wrote:
Hi, Am referring your project but in train.py I getting one error as shown below. **File "E:/Malicious-Web-Content-Detection-Using-Machine-Learning-master/train.py", line 14, in data1 = data1[0:, : -1]
TypeError: list indices must be integers or slices, not tuple**
Also even tried to solve it....I don't get it the use of this snippet
data1 = data1[0 : -1] for i in data1: labels.append(i[30])
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rohitnaik246/Malicious-Web-Content-Detection-Using-Machine-Learning/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/ARMAL1_OC1kj8qvmLDAGYY7HY0JTDYzoks5vGADLgaJpZM4aOHyt .
3.6.4
Probably that is the reason. This project was done using Python 2.7. There are certain small differences between the two versions which might cause this issue. Please try with Python 2.7
Thanks and regards, Rohit Naik
On Mon, Jan 28, 2019 at 10:39 AM sayalijangam notifications@github.com wrote:
3.6.4
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rohitnaik246/Malicious-Web-Content-Detection-Using-Machine-Learning/issues/2#issuecomment-458000625, or mute the thread https://github.com/notifications/unsubscribe-auth/ARMALx7QsORy5beW2_2vhc6CAwjEOuuiks5vHoX8gaJpZM4aOHyt .
Now I've done using python 2.7.....but still facing same error``
You can see error using above link
Hi Sayali, It seems to be working fine on my end. I tried replicating the situation with a much smaller data set just for representation purpose.
data_list = file.split('\n')
works but for Python2 data_list = file.split('\r\n')
is needed for the correct split.git pull
and run this newly added file temp.py
on your end and please attach the results if the problem persists.Thanks
I have revamped the entire project to remove certain deprecated method calls, improved certain aspects of the code. Please do a git pull
on the project and try running it according to the steps for reproducing the project.
Thanks
Since, there has been no reply to this thread, I am closing it. Kindly open up another issue if there is any other problem. Thanks!
Hi, Am referring your project but in train.py I getting one error as shown below. **File "E:/Malicious-Web-Content-Detection-Using-Machine-Learning-master/train.py", line 14, in
data1 = data1[0:, : -1]
TypeError: list indices must be integers or slices, not tuple**
Also even tried to solve it....I don't get it the use of this snippet data1 = data1[0 : -1] for i in data1: labels.append(i[30])