I am getting an core.exception.InvalidMemoryOperationError@(0)

     auto recs = f  // Open for reading
                           .byLineCopy();
.array; //Here is where is appears to be happening.

I have narrowed it down to the .array. I am wondering if there is some common issue I may be experiencing or if there is a better solution?

Here is what I am overall trying to achieve.

     auto recs = f  // Open for reading
                           .byLineCopy;
                           .array();
.map!(a=> assocArray(zip(h1.fullHeader, splitter(a,','))))
                           .map!(a=>a.byKeyValue()
.filter!(a=>h1.filteredHeader.canFind(a.key)));

        foreach(item;recs){
                           auto item = Json.emptyObject;
each!((k)=> item[k.key] = k.value)(item); insert(item, dateIndex); //ElasticSearch
        }

Also any suggestions on the code are greatly appreciated :)

Reply via email to