Error trying to save OPF model

Hi folks! I think I come across some issue when trying to save the OPF model using


The error are like following:

Traceback (most recent call last):
  File "/Users/myname/Documents/python/HTM/src/", line 413, in <module>'/Users/myname/Documents/python/HTM/src/model/OPF.model')
  File "/Users/myname/Documents/python/HTM/venv/lib/python2.7/site-packages/nupic/frameworks/opf/", line 360, in save
  File "/Users/myname/Documents/python/HTM/venv/lib/python2.7/site-packages/nupic/frameworks/opf/", line 1429, in _serializeExtraData
  File "/Users/myname/Documents/python/HTM/venv/lib/python2.7/site-packages/nupic/engine/", line 729, in save, *args, **kwargs)
  File "/Users/myname/Documents/python/HTM/venv/lib/python2.7/site-packages/nupic/bindings/", line 1214, in save
    return _engine_internal.Network_save(self, *args, **kwargs)
SystemError: NULL result without error in PyObject_Cal

Can anybody help me with this? I have been stuck here for a long time. Thanks!

I’m not sure that NuPIC is installed correctly. How did you install it?

Thanks Rhyolight!
I think I install nupic in Pycharm CE, and I use Python 2.7. I’d appreciate any suggestions or experience. Thanks!

I would suggest you do not install NuPIC through an IDE. Do you know how to use pip? I suggest you install nupic with pip.

1 Like

Thanks Rhoylight! I have tried the way you suggested. I can generate anomaly score but still the same error shows up when I tried to save the model.

By the way, I think maybe python 2 has some bug in pickling large arrays, which leads to this SystemError as you described in, which I really appreciate. But seems like this python bug has already been resolved in environment >= python 3.3. So I am wondering if nupic has already been compatible with python 3.3+? If not, I’d appreciate any suggestion/reference on how to set model parameters so that the array size will not exceed the array limit when saving the model?

I’d appreciate any suggestion. Thanks!