Hello developers!
I’ve encountered a problem while choosing the solver, the mfix 23.4.1 told me that local variable ‘row’ referenced before assignment. Would you please to help me to see how to fix the problem? Or just let me know that whether this kind of problem may influence the result. Thank you!
Hi @maxmfix - thanks for the error report. It took me a little while to reproduce this, it seems that you have to set up some solids, then remove them, then switch to single-phase, then try to switch back to DEM … the GUI is trying to show information for solids which are no longer defined.
It should be safe to ignore this error since it’s only a display issue. If in doubt, save your file and restart MFiX … the error should not reappear.
However, if you are comfortable doing so, you can apply a fix: edit the file \Users\max\anaconda3\envs\mfix-23.4.1\lib-site-packags\mfixgui\solids.dem.py (make a backup copy first!), find this section at line 856:
solids_names = list(self.solids.keys())
if self.solids_dem_saved_solids_names != solids_names:
and change it to:
solids_names = list(self.solids.keys())
row = 0
if self.solids_dem_saved_solids_names != solids_names:
(adding the row = 0 line)
This will prevent further problems with switching between DEM and Single phase.