Python error solve

1

Hii,
I ran a script called defrag.py (github.com/VUmcCGP/wisecondor/blob/legacy/defrag.py) and found this error:

Traceback (most recent call last):
  File "defrag.py", line 265, in <module>
    prediction = gnb.predict[(getYPerc[testSamplesPickle[testSample]])]
TypeError: 'function' object has no attribute '__getitem__'

I changed this line numerous times but it didnt work out. I have changed the brackets because the error is due to brackets only (I guess), but I dont know how to fix it. I have already searched in google and tried but didnt get the right answer. Please help me regarding this.


python

• 148 views

Hi, the script seems old (circa 2014) and probably requires Python v2.x, whereas you may be using Python v3.x. Can you confirm your Python version?

Indeed, please see Requirements: github.com/VUmcCGP/wisecondor/tree/legacy#requirements

If needed, you could create a new miniconda environment using Python 2.7 and try the script there.

Kevin


Login
before adding your answer.

Traffic: 2288 users visited in the last hour



Source link