Open melmatt7 opened 1 month ago
Thanks for raising this, I'll go ahead and investigate it. Do you have a code example that could reproduce this error?
Hi, sure, something like:
local_config = copy.deepcopy(config)
for a config object as attached old_config.txt
Hi @melmatt7 I seem to be unable to reproduce the error. The config file you sent is of the qua config, not QuAM. Could you share the JSON file which results from QuAM.save()
? Or alternatively the code you use to generate the QuAM structure?
When one tries to deepcopy the generated configuration object of type QuamBase, they run into a recursion error as seen below:
This error specifically is raised within the Bakery class provided by QM. The source of this error is due the way
__getattr__
and__setattr__
are implemented, leading to infinite recursion when deepcopy attempts to copy the attributes of the object.A very quick fix to this issue is the following modifications to the
__getattr__
and__setattr__
functions within the QuamDict class: