I found the problem to be the machine memory.
I was dumping a very large python list.... each list item had 54 elements of mixed type and there were up to ~1.7M of them.... At about 400K, it started to produce a memory error.
I had the luxury of working on a cluster that I could specify the system memory when in batch mode and found that I had to increase the requested memory - in my case, up to 50Gb and the memory error disappeared.