I'm not sure why but I have made a basic example or an issue I'm having with deep copy and a NSData object in another project. I'm pretty sure this has worked its been a while since I used it. Anyway here is my snippet
from objc_util import *
import copy
d = NSData.alloc().init()
b = copy.deepcopy(d)
Here is a copy of the trace back from the error
Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/831181D5-300F-4A12-BF91-9737C689FE30/Pythonista3/Documents/test.py", line 6, in <module>
b = copy.deepcopy(d)
File "/var/containers/Bundle/Application/35ADEEB8-25F6-4382-BEAF-82545DF5D05E/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/copy.py", line 183, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/var/containers/Bundle/Application/35ADEEB8-25F6-4382-BEAF-82545DF5D05E/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/copy.py", line 294, in _reconstruct
y = callable(*args)
File "/var/containers/Bundle/Application/35ADEEB8-25F6-4382-BEAF-82545DF5D05E/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/copyreg.py", line 89, in __newobj__
return cls.__new__(cls, *args)
TypeError: __new__() missing 1 required positional argument: 'ptr'