Open braymp opened 12 years ago
There are two bugs here: first, we should do something other than throw an exception when loading properties, if at all possible. In this case, probably we should offer to rename the filter. Since CPA can't run without a good properties file, we should make an effort to be accommodating to somewhat broken ones.
Also, we should use the CP error dialog on uncaught exceptions in CPA.
Right now, cpa quits suddenly with the following error msg (unseen if not using cli)
Traceback (most recent call last): File "cpa.py", line 529, in
app = CPAnalyst(redirect=False)
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx_core.py", line 7981, in init
self._BootstrapApp()
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx_core.py", line 7555, in _BootstrapApp
return core.PyApp__BootstrapApp(_args, *_kwargs)
File "cpa.py", line 447, in OnInit
if not show_load_dialog():
File "c:\Trunk\CellProfiler-Analyst\cpa\guiutils.py", line 814, in show_load_dialog
p.load_file(filename)
File "c:\Trunk\CellProfiler-Analyst\cpa\properties.py", line 248, in load_file
raise Exception, 'PROPERTIES ERROR (%s): Filter names may only contain alphanumeric characters and "_".'%filter_name) Exception: PROPERTIES ERROR (092110-NR1): Filter names may only contain alphanumeric characters and "".
A pleasant dialog box would be nice.