When running c2s with python3 dependencies, preprocessing .mat data results in 'Attribute not found' error because backward compatibility for dict iteritems() method is not provided properly.
Stack trace originates at cs2-preprocess line 43.
The problem is in utils convert method. return dict([(convert(key), convert(value)) for key, value in input.iteritems()]). In python3 dicts don't have iteritems method any more.
Since using items() is very slow in python2 I resortet to using from future.utils import iteritems to fix it.
Thanks @viktorbahr, I fixed it. I think using items() is fine here, as the number of items in input should never be that long that generating a list creates a lot of overhead.
When running c2s with python3 dependencies, preprocessing .mat data results in 'Attribute not found' error because backward compatibility for dict
iteritems()
method is not provided properly.Stack trace originates at cs2-preprocess line 43. The problem is in utils
convert
method.return dict([(convert(key), convert(value)) for key, value in input.iteritems()])
. In python3 dicts don't haveiteritems
method any more. Since usingitems()
is very slow in python2 I resortet to usingfrom future.utils import iteritems
to fix it.