I ‘solved’ this problem by…essentially, no longer trying to do this anymore.
I was getting the error while “generating data on the fly”, and instead I now prefer to pre-generate my data and save it to a set of files on disk first.