# TypeError: Couldn't cast array of type int64 to null

**URL:** <https://discuss.huggingface.co/t/typeerror-couldnt-cast-array-of-type-int64-to-null/138935>\
**Category:** 🤗Datasets\
**Created:** [February 4, 2025, 12:47pm UTC](https://discuss.huggingface.co/t/typeerror-couldnt-cast-array-of-type-int64-to-null/138935 "2025-02-04T12:47:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [February 5, 2025, 11:53am UTC](https://discuss.huggingface.co/t/typeerror-couldnt-cast-array-of-type-int64-to-null/138935/2 "2025-02-05T11:53:41Z")

</div>

I found a similar case, but it’s different…

> <https://stackoverflow.com/questions/79012832/multiprocess-pool-remotetraceback-and-typeerror-couldnt-cast-array-of-type-str>

> [@TypeError: Couldn't cast array of type int64 while mapping the dataset](https://discuss.huggingface.co/t/typeerror-couldnt-cast-array-of-type-int64-while-mapping-the-dataset/22167):
>
> Hai, I am trying to finetune LayoutLMV2 model for document image classification but in preprocessing stage I am getting error. Can some one please help me in fixing the error. dataset = Dataset.from\_pandas(df\_copy) dataset Dataset({ features: ['Image\_File\_Path', 'Label'], num\_rows: 12 }) this is the code # we need to define custom features path = './Image FIle/' features = Features({ 'image': Array3D(dtype="int64", shape=(3, 224, 224)), 'input\_ids': Sequence(feature=Value(d…

---

_[View the full topic](https://discuss.huggingface.co/t/typeerror-couldnt-cast-array-of-type-int64-to-null/138935)._
