gafusion / omas

Ordered Multidimensional Array Structure
http://gafusion.github.io/omas
MIT License
30 stars 15 forks source link

trouble copying old ods #139

Closed jmcclena closed 3 years ago

jmcclena commented 3 years ago

I have trouble copying old ods's in old OMFIT projects with the following error:

AttributeError: 'ODS' object has no attribute '_dynamic'"

An Example ods can be found as /cscratch/mcclenaghanj/ods.pkl

As a temporary solution, I added _dynamic=None to the ods with:


def dynamicify_ods(ods):
    ods._dynamic = None
    for item in ods:
        if isinstance(ods[item],ODS):
            ods[item]._dynamic = None
            dynamicify_ods(ods[item])```