I am having some trouble with my program's architecture and pickling different processes. At the moment I am receiving a Can't pickle 'BufferRegion' object: <BufferRegion object at 0x03F2B65C> error. My project idea is to have a very complex set of graphed data be presented and fitted within a GUI. Since the data will be very complex, and a large amount of functions will be used to fit it, I would like to show the progress of the fit along the process, without having the GUI be unresponsive. I am using multiprocessing to spawn several fitting procedures in parallel. The fitting method I have takes in a single tab which has an associated data object (each tab processes a different set of data).
I'm not sure, but think there is a problem with having a GUI element in a parameter of a function being passed to a process.
I have created objects for:
1 - The data : with properties being (X,Y,Z, dYdX, etc..) and some dictionaries to hold information about properties which will be found by fitting the data.
2 - Species : this object holds information which will be used in the functions to fit the data (like what x value will show a peak for a specific species)
3 - Data_tab : (inherits PyQt4.QtGui.QTabWidget) this is a special tab which holds the GUI elements and the matplotlib lines and scatter plots which will be assigned to this tab. Each tab should only be associated with one data object. Also, this object holds the function which should reset the data and matplotlib lines after every fitting process and update all of the values held in species.
4 - mainwindow : has the buttons to initiate the process The fitting processes are handled by functions which are not held within an object, but my hope is that they easily could be. These fitting processes take in the Data_tab object, such that when the fitting process iterates, it can call the function which resets the data.
I believe this may be where my problem is but I see no other way to perform this.
My Ultimate Question: Is there another architecture scheme to solve this or is there a way to make these GUI processes pickleable?
I'm not sure, but think there is a problem with having a GUI element in a parameter of a function being passed to a process.
I have created objects for:
1 - The data : with properties being (X,Y,Z, dYdX, etc..) and some dictionaries to hold information about properties which will be found by fitting the data.
2 - Species : this object holds information which will be used in the functions to fit the data (like what x value will show a peak for a specific species)
3 - Data_tab : (inherits PyQt4.QtGui.QTabWidget) this is a special tab which holds the GUI elements and the matplotlib lines and scatter plots which will be assigned to this tab. Each tab should only be associated with one data object. Also, this object holds the function which should reset the data and matplotlib lines after every fitting process and update all of the values held in species.
4 - mainwindow : has the buttons to initiate the process The fitting processes are handled by functions which are not held within an object, but my hope is that they easily could be. These fitting processes take in the Data_tab object, such that when the fitting process iterates, it can call the function which resets the data.
I believe this may be where my problem is but I see no other way to perform this.
My Ultimate Question: Is there another architecture scheme to solve this or is there a way to make these GUI processes pickleable?