Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
cannot pickle pymxs.MXSWrapperBase
Getting error while deepcopy pymxs object
Solved! Go to Solution.
Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.
cannot pickle pymxs.MXSWrapperBase
Getting error while deepcopy pymxs object
Solved! Go to Solution.
which object do you want to copy and how? please give a code example... otherwise the question is too abstract and does not make general sense.
import pymxs
mxs = pymxs.runtime
cameraName = "VRayPhysical_configurator_animated_lhd"
node = mxs.getnodebyname( cameraName )
dict1 = {}
import copy
dict1["cam"] = copy.deepcopy(node)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\3dsmax2023x64\3ds Max 2023\Python\lib\copy.py", line 161, in deepcopy
rv = reductor(4)
TypeError: cannot pickle 'pymxs.MXSWrapperBase' object
This will work for Max2019 and throwing error with Max2023
@pradeep_cher wrote:
import copy
dict1["cam"] = copy.deepcopy(node)
you can't use Python copy method to copy MAX objects or values. You must use MXS copy or deepcopy for this:
mxs = pymxs.runtime
mxs.copy (node)
## or mxs.deepcopy for array values, for example
Than you @denisT.MaxDoctor , this worked