numenta / nupic-legacy

Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.
http://numenta.org/
GNU Affero General Public License v3.0
6.34k stars 1.56k forks source link

Hotgym, running run.py, Typeerror #3123

Open domisoxz opened 8 years ago

domisoxz commented 8 years ago

After running run.py I got the following error:

File"home/domiso/.local/lib/python2.7/site-packages/nupic/frameworks/opf/modelfactory.py",line 70, in create if modelConfig['model']="CLA": TypeError:'NoneType' object has no attribute 'getitem'

How to solve it?

rhyolight commented 8 years ago

Hi, you must be Claire from YouTube? Please answer a couple questions for me:

domisoxz commented 8 years ago

Hi Matt,

Yes. I am using ubuntu 16.04 64 bit. I installed NUPIC using the following command from your website:

pip install https://s3-us-west-2.amazonaws.com/artifacts.numenta.org/numenta/nupic.core/releases/nupic.bindings/nupic.bindings-0.4.2-cp27-none-linux_x86_64.whl pip install nupic

I have run the test.py after installation and no error was reported. I have also run the swarm.py and it worked.

I have been following your youtube video and I am now with running the run.py and that's when I run into this problems.

Is it because in the modelfactory.py line 69 it assigns ModelClass = None and in the following lines, it tries to assign an value to ModelClass based on the modelConfig info? How can I solve it?

Thanks, Claire

On Mon, May 9, 2016 at 12:58 PM, Matthew Taylor notifications@github.com wrote:

Hi, you must be Claire from YouTube? Please answer a couple questions for me:

  • What OS are you using?
  • How did you install NuPIC?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/numenta/nupic/issues/3123#issuecomment-217923383

Claire Xu Zhang

rhyolight commented 8 years ago

I have not tried installing NuPIC on Ubuntu 16 yet. Can you tell me what version of python it uses?

python --version
RuneKR commented 7 years ago

I have the same problem with Python 2.7.10. I am on Mac OS 10.12.4 (16E195)

rhyolight commented 7 years ago

@MedSolve Please tell me:

RuneKR commented 7 years ago

This is the versions i am not sure about the source code version since i set up "my own" code here

The error: File "/Users/mrmusling/Desktop/htm-ecg/nupic/implementation.py", line 140, in predic infer=True File "/Library/Python/2.7/site-packages/nupic/bindings/algorithms.py", line 2906, in c ompute if type(classification["actValue"]) in (int, float): TypeError: 'NoneType' object has no attribute '__getitem__'

This is the parts of the source code. The variables recordNum and patternNZ is elsewhere so i just left them out. I have already trained my classifier that part is left out too.

classifier = SDRClassifierFactory.create()

result = classifier.compute(
            recordNum=recordNum,
            patternNZ=patternNZ,
            classification=None,
            learn=False,
            infer=True
)

After updating to 0.7.0.dev0 (used 0.6.0 before) this below worked but i dont think it is correct behavior according to your documentation

Classification could be None for inference mode.

classifier = SDRClassifierFactory.create()

result = classifier.compute(
            recordNum=recordNum,
            patternNZ=patternNZ,
            classification={
                "bucketIdx": None,
                "actValue": None
            },
            learn=False,
            infer=True
)
rhyolight commented 7 years ago

Classification could be None for inference mode.

@ywcui1990 Do you know the origin of this comment from the docs?