<div dir="ltr"><div><div>Hi, all--<br><br>I'm trying to pickle a dataset I made with cut_region. This fails on the call to __reduce__ since the cut_region doesn't have a _type_name attribute. Is there an easy way to give _type_names to cut regions in general, or should I clone the __reduce__ method for InLineExtractedRegionBase?<br>
<br></div>I generate the object like this:<br><br>>> region = pf.h.region(Center,Left,Right)<br>>> cut_region = region.cut_region(['grid[some_field] == some_value'})<br></div>>> file = open(args)<br>
>> cPickle.dump(cut_region,file)<br><div><div><div><br> which gives the following error:<br></div><div><br>Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br> File "/nics/b/home/collins/yt2.0/fPickle.py", line 15, in dump<br> output = cPickle.dump(object,file,*args,**kwargs)<br> File "/nics/b/home/collins/local_2013_03_12/src/yt-dave/yt/data_objects/data_containers.py", line 407, in __reduce__<br>
[getattr(self, n) for n in self._con_args] +<br>AttributeError: 'InLineExtractedRegionBase' object has no attribute '_type_name'<br><br><br></div><div>Thanks!<br>d.<br></div></div></div></div>