kite icon indicating copy to clipboard operation
kite copied to clipboard

TypeError: object of type 'NoneType' has no len()

Open mahinjafari opened this issue 7 years ago • 0 comments

Hi I am new in python. I want to import my mat file but I encounter with the following error:

In [17]: scene = Scene.import_data('CSK20160614-20160625asc.mat')

TypeError Traceback (most recent call last) in ----> 1 scene = Scene.import_data('CSK20160614-20160625asc.mat')

/usr/local/lib/python3.5/dist-packages/kite-2018.2.26-py3.5-linux-x86_64.egg/kite/scene.py in dynclassmethod(*args, **kwargs) 403 return func(*args, **kwargs) 404 else: --> 405 return func(Scene(), *args, **kwargs) 406 407 dynclassmethod.doc = func.doc

/usr/local/lib/python3.5/dist-packages/kite-2018.2.26-py3.5-linux-x86_64.egg/kite/scene.py in _import_data(self, path, **kwargs) 797 scene._log.debug('Importing %s using %s module' % 798 (path, mod)) --> 799 data = module.read(path, **kwargs) 800 break 801 if data is None:

/usr/local/lib/python3.5/dist-packages/kite-2018.2.26-py3.5-linux-x86_64.egg/kite/scene_io.py in read(self, filename, **kwargs) 168 theta0 = mat[mat_k].flatten() 169 --> 170 if len(theta0) == 1: 171 c.theta = num.ones(num.shape(c.displacement)) * theta0 172

TypeError: object of type 'NoneType' has no len()

mahinjafari avatar Nov 26 '18 08:11 mahinjafari