Error running network example, missing py.AnomalyLikelihoodRegion

This error was reported here. To replicate:

python $NUPIC/examples/network/network_api_demo.py

Returns this error:

      File "/opt/nupic.core-master/bindings/py/src/nupic/bindings/engine_internal.py", line 1167, in addRegion
        return _engine_internal.Network_addRegion(self, *args, **kwargs)
    ImportError: No module named AnomalyLikelihoodRegion

You can see that this script is trying to add an AnomalyLikelihoodRegion here:

Usually when there is a missing region, I review the python region definitions in engine/__init__.py:

But as you can see, there is a region specified:

("nupic.regions.AnomalyLikelihoodRegion", "AnomalyLikelihoodRegion"),

What else could be causing this error? @scott? @subutai?

It looks like the file was renamed. You could try changing that last line to:

("nupic.regions.anomaly_likelihood_region", "AnomalyLikelihoodRegion"),

I think that will work but at some point there was a limitation that required the module and class names to match which would mean the file name would need to be changed. I think that has since been fixed though.

Yep, that was it. Thanks Scott. I will not release a bugfix for this, since it is just an example in the repo. Fix here:

https://github.com/numenta/nupic/pull/3770