qudi icon indicating copy to clipboard operation
qudi copied to clipboard

Pulsed 3.0 additional sampling func and predefined methods in same folder

Open kay-jahnke opened this issue 5 years ago • 0 comments

What is affected by this bug?

If the two optional parameters of sequencegeneratorlogic additional_predefined_methods_path and additional_sampling_functions_path point to the same folder, problems can arise when pickling.

The error arises when a sampling function uses or references an objectiv (and not only a primitive). We assume, that the sampling function class is loaded a second time together with the predefined methods but not used. This however changes the reference to the objects and pickle doesn't like that.

Confusingly, qudi throws the error 'Failed to serialize PulseBlockEnsemble "example" to file.' because the except clause above (line 852 in sequence_generator_logic.py) hides the underlying pickle exception. To see the real error you need to get rid of the try-except-block around the pickle command.

When does this occur?

The two optional parameters of sequencegeneratorlogic additional_predefined_methods_path and additional_sampling_functions_path point to the same folder.

Where on the platform does it happen?

Any that was tested: Dummy with Win7 64x and Lap Polarizer setup on Win 8.1 64x

How do we replicate the issue?

see above.

Expected behavior (i.e. solution)

The import of predefined methods should not influence the import of the sampling functions and vice versa.

kay-jahnke avatar Sep 19 '18 11:09 kay-jahnke