Project

General

Profile

Revision 831:663001078b4f

ID663001078b4f
Parent 830:7fd5b60ffc5a
Child 832:569bb279e3e1

Added by Maarten Sneep about 2 years ago

Improve the error message when concatenating a histogram where the number of elements has changed

View differences:

src/pycama/HistogramPlot.py
389 389
                    var.attrs['color_scale'] = self.variables_meta[k]['color_scale']
390 390
                    var.attrs['log_range'] = str(self.variables_meta[k]['log_range'])
391 391
                    var.attrs['bins'] = k+'_histogram_bins'
392

  
393
                var[time_step, :] = self.variables[k+'.histogram']
392
                
393
                try:
394
                    var[time_step, :] = self.variables[k+'.histogram']
395
                except TypeError as err:
396
                    self.logger.warning(f"Error in variable '{k}'")
397
                    self.logger.warning(str(err))
398
                    raise
394 399

  
395 400
                ## Create bins variable for histogram axis, including bounds.
396 401
                try:

Also available in: Unified diff