I'm using the megahal mh_python module to make a bot instance learn from a several 100 files. The code works as it should for 4-6 files before crashing with this error message "Fatal error: deallocating None" There isn't much documentation on this anywhere.
Is your mh_python module written in C/C++ or Python? If it's written in C or C++ check your Py_DECREF calls. You are probably doubly decrementing some object which at times refers to Py_None. Do that enough and you eventually try to deallocate it. In fact, it does appear that the Megahal python wrapper is written in C. I don't know where the source is, but it's almost certain the problem lies there, not in the Python interpreter core. I suggest you contact the Megahal author(s).