# SDRClassifier will not compute!

**URL:** <https://discourse.numenta.org/t/sdrclassifier-will-not-compute/5632>\
**Category:** NuPIC\
**Created:** [March 16, 2019, 11:03am UTC](https://discourse.numenta.org/t/sdrclassifier-will-not-compute/5632 "2019-03-16T11:03:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon.1](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@simon.1](https://discourse.numenta.org/u/simon.1)\
**Post date:** [March 16, 2019, 11:03am UTC](https://discourse.numenta.org/t/sdrclassifier-will-not-compute/5632/1 "2019-03-16T11:03:20Z")

</div>

I am trying to train an SDRClassifier, but I cannot get even the first training pattern to “compute”. I get an error message: (I am using your docker image on linux)

```auto
File "/usr/local/lib/python2.7/dist-packages/nupic.bindings-1.0.7.dev0-py2.7-linux-x86_64.egg/nupic/bindings/algorithms.py", line 3140, in compute
    for i in xrange(len(arrayResult["actualValues"])):
KeyError: 'actualValues'

```

I put some print statements in nupic/bindings/algorithms.py to see what was going on and have determined that the above error message arises because _arrayResult[“actualValues”]_ does not exist, i.e. arrayResult is an empty dict, and this traces back to a few lines above to this call:

```auto
      result = self.convertedCompute(
          recordNum, patternNZ, bucketIdxList,
          actValueList, category, learn, infer)

```

Here the _result_ is also an empty dict. I have printed out all the arguments to the call to _self.convertedCompute_() below, which all look as I expected, so I do not understand why nothing comes back from this call?

```auto
('len(PatternNZ)', 2048)
('max(patternNZ)', 1.0)
('patternNZ indices', array([ 98, 135, 348, 355, 508, 767, 830, 831, 860, 885, 929,
        956, 1070, 1131, 1157, 1329, 1407, 1431, 1591, 1600, 1603, 1633,
       1655, 1697, 1716, 1718, 1725, 1764, 1776, 1783, 1815, 1824, 1851,
       1870, 1907, 1917, 1972, 1977, 1981, 2039]))
('bucketIdxList', [925])
('actValueList', [925])
('category', True)
('recordNum', 1)
('learn', True)
('infer', False)

('result', {})

```

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [March 17, 2019, 12:37am UTC](https://discourse.numenta.org/t/sdrclassifier-will-not-compute/5632/2 "2019-03-17T00:37:59Z")

</div>

Thanks for the question. I will be more able to help if you can share your code. Are you using the [algorithms API](http://nupic.docs.numenta.org/stable/quick-start/algorithms.html) or something else?
