Skip to content

Commit fff971a

Browse files
author
Nicholas Holschuh
committed
Fixed an error associated with attribute dictionaries
1 parent 5987514 commit fff971a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: savemat.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ def savemat(matfiledata,fn):
3232

3333
rm_keys = []
3434
for i in list(matfiledata):
35-
if isinstance(matfiledata[i],mat73.AttrDict):
36-
rm_keys.append(i)
35+
try:
36+
if isinstance(matfiledata[i],mat73.AttrDict):
37+
rm_keys.append(i)
38+
except:
39+
pass
3740

3841
if len(rm_keys) > 0:
3942
print('Warning: .mat save functions can''t handle certain object types [mat73.AttrDict].\n')

0 commit comments

Comments
 (0)