okfn / messytables

Tools for parsing messy tabular data. This is now superseded by https://github.com/frictionlessdata/tabulator-py
http://messytables.readthedocs.io/
387 stars 110 forks source link

Datastorer throws error #31

Closed domoritz closed 11 years ago

domoritz commented 11 years ago
[2013-01-11 18:37:26,055: ERROR/MainProcess] Task datastorer.upload[0c511be4-01ca-464c-9289-bffc06ca55ec] raised exception: AttributeError("'NoneType' object has no attribute 'value'",)
Traceback (most recent call last):
  File "/Users/sw/.virtualenvs/ckan/lib/python2.7/site-packages/celery/execute/trace.py", line 47, in trace
    return cls(states.SUCCESS, retval=fun(*args, **kwargs))
  File "/Users/sw/.virtualenvs/ckan/lib/python2.7/site-packages/celery/app/task/__init__.py", line 247, in __call__
    return self.run(*args, **kwargs)
  File "/Users/sw/.virtualenvs/ckan/lib/python2.7/site-packages/celery/app/__init__.py", line 175, in run
    return fun(*args, **kwargs)
  File "/Users/sw/Sites/ckan/ckanext-datastorer/ckanext/datastorer/tasks.py", line 92, in datastorer_upload
    return _datastorer_upload(context, data, logger)
  File "/Users/sw/Sites/ckan/ckanext-datastorer/ckanext/datastorer/tasks.py", line 182, in _datastorer_upload
    for data in chunky(row_set.dicts(), 100):
  File "/Users/sw/Sites/ckan/ckanext-datastorer/ckanext/datastorer/tasks.py", line 176, in chunky
    dict, itertools.islice(it, n)))
  File "/Users/sw/.virtualenvs/ckan/src/messytables/messytables/core.py", line 189, in dicts
    generator = self.sample if sample else self
  File "/Users/sw/.virtualenvs/ckan/src/messytables/messytables/core.py", line 170, in __iter__
    import pdb; pdb.set_trace()
  File "/Users/sw/.virtualenvs/ckan/src/messytables/messytables/types.py", line 189, in apply_types
    if strict and type and cell.value:
AttributeError: 'NoneType' object has no attribute 'value'
domoritz commented 11 years ago

Looks like the sample (window) was too small.