erp5_dat_notebook bt5: Do not save modules object in local_variable_dict
Problem: Module objects are not picklable, thus, trying them to save in local_variable_dict which is further saved in ZODB via ActiveResult object of CMFActivity was giving error. So, its better to save the module objects as code_strings in local_variable_dict. As for now, for example: local_variable_dict = {'imports': ['import numpy as np', 'import matplotlib as mpl'], 'variables': {'a':1, 'b:2'}} for jupyter_code = """ import numpy as np import matplotlib as mlp a= 1; b=2; print a+b """
Showing
Please register or sign in to comment