# How to pickle 'MRMLCorePython.vtkMRMLScene' object

**URL:** <https://discourse.slicer.org/t/how-to-pickle-mrmlcorepython-vtkmrmlscene-object/37733>\
**Category:** Support\
**Tags:** python\
**Created:** [August 6, 2024, 2:07pm UTC](https://discourse.slicer.org/t/how-to-pickle-mrmlcorepython-vtkmrmlscene-object/37733 "2024-08-06T14:07:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alientex](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alientex](https://discourse.slicer.org/u/alientex)\
**Post date:** [August 6, 2024, 2:07pm UTC](https://discourse.slicer.org/t/how-to-pickle-mrmlcorepython-vtkmrmlscene-object/37733/1 "2024-08-06T14:07:35Z")

</div>

Hello everyone,

Does anyone know how to pickle an arbitrary object type like `MRMLCorePython.vtkMRMLScene` in python?

I am trying to start a process from the main process by passing the function `SaveSceneToSlicerDataBundleDirectory` to the `multiprocessing.Process`:

```auto
from multiprocessing import Process
f = slicer.mrmlScene.SaveSceneToSlicerDataBundleDirectory
p = Process(target=f, args=("C:/Users/Tex/Desktop/TestScene",))
p.start()

```

But I am getting the following error:

```auto
TypeError: cannot pickle 'MRMLCorePython.vtkMRMLScene' object

```

I would appreciate any help.

Thank you.

---

<div class="post-metadata">

**Author:** ![alientex](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alientex](https://discourse.slicer.org/u/alientex)\
**Post date:** [August 8, 2024, 4:46am UTC](https://discourse.slicer.org/t/how-to-pickle-mrmlcorepython-vtkmrmlscene-object/37733/2 "2024-08-08T04:46:15Z")

</div>

Can anybody please help me solve this problem?
