File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -778,16 +778,25 @@ def append_evaluations(evaluations, group):
778778 f = backend .File (filename , "r" )
779779
780780 if "uncertain parameters" in f .attrs :
781- self .uncertain_parameters = [parameter .decode ("utf8" ) for parameter in f .attrs ["uncertain parameters" ]]
781+ try :
782+ self .uncertain_parameters = [parameter .decode ("utf8" ) for parameter in f .attrs ["uncertain parameters" ]]
783+ except (UnicodeDecodeError , AttributeError ):
784+ self .uncertain_parameters = [parameter for parameter in f .attrs ["uncertain parameters" ]]
782785
783786 if "model name" in f .attrs :
784787 self .model_name = str (f .attrs ["model name" ])
785788
786789 if "incomplete results" in f .attrs :
787- self .incomplete = [incomplete .decode ("utf8" ) for incomplete in f .attrs ["incomplete results" ]]
790+ try :
791+ self .incomplete = [incomplete .decode ("utf8" ) for incomplete in f .attrs ["incomplete results" ]]
792+ except (UnicodeDecodeError , AttributeError ):
793+ self .incomplete = [incomplete for incomplete in f .attrs ["incomplete results" ]]
788794
789795 if "error" in f .attrs :
790- self .error = [irregular .decode ("utf8" ) for irregular in f .attrs ["error" ]]
796+ try :
797+ self .error = [irregular .decode ("utf8" ) for irregular in f .attrs ["error" ]]
798+ except (UnicodeDecodeError , AttributeError ):
799+ self .error = [irregular for irregular in f .attrs ["error" ]]
791800
792801 if "method" in f .attrs :
793802 self .method = str (f .attrs ["method" ])
You can’t perform that action at this time.
0 commit comments