Entering edit mode
3.6 years ago
smrutimayipanda
▴
20
Hii, I ran a script called defrag.py (https://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.
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: https://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.
my python version is 2.7 only. I created new conda environment for running this in older version.
This is the first error before changing the parantheses:
I dont know how to fix it. Do you have any idea about this?
Hi, please do not add comments and information via the answer field. That messes up the logic of the thread. You can use
ADD REPLY/COMMENT
or theedit
button to add details to your toplevel question. Thank you.