codeforIATI / iatikit

🐨 A toolkit for using IATI data
https://iatikit.readthedocs.io
MIT License
6 stars 0 forks source link

TypeError: '<' not supported between instances of 'str' and 'NoneType' #52

Closed andylolz closed 4 years ago

andylolz commented 4 years ago

Describe the bug

Error appears when doing anything with recently downloaded data.

To Reproduce

Steps to reproduce the behaviour:

import iatikit

for x in iatikit.data().datasets:
    pass

…and see the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/iatikit/data/dataset.py", line 243, in __iter__
    paths = sorted(list(paths.values()))
TypeError: '<' not supported between instances of 'str' and 'NoneType'

Additional context

Previously, failed XML downloads resulted in a blank file. Now, they result in a missing file. iatikit should probably cope with both.

andylolz commented 4 years ago

Fixed in 3e5080a29b9059cb66eeffdc5cf2d49082c6bb0b.