Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

location/point/pos may exist but be empty #95

Closed
dalepotter opened this issue May 4, 2017 · 0 comments
Closed

location/point/pos may exist but be empty #95

dalepotter opened this issue May 4, 2017 · 0 comments

Comments

@dalepotter
Copy link
Contributor

dalepotter commented May 4, 2017

Files containing data such as this (example file):

<location>
  <point srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
    <pos/>
  </point>
</location>

Cause issues with the stats code. The end result is that the comprehensiveness_with_validation.json returns an empty dictionary - i.e. {}.

Stack trace:

-> bools.update({
(Pdb) c
Traceback (most recent call last):
  File "/Users/dalepotter/Documents/IATI-Stats/statsrunner/loop.py", line 18, in call_stats
    this_out[name] = function()
  File "/Users/dalepotter/Documents/IATI-Stats/stats/common/decorators.py", line 43, in wrapper
    out = f(self, *args, **kwargs)
  File "/Users/dalepotter/Documents/IATI-Stats/stats/dashboard.py", line 1140, in comprehensiveness_with_validation
    ) else 0) for k,v in self._comprehensiveness_with_validation_bools().items() }
  File "/Users/dalepotter/Documents/IATI-Stats/stats/dashboard.py", line 1056, in _comprehensiveness_with_validation_bools
    bools.update({
  File "/Users/dalepotter/Documents/IATI-Stats/stats/dashboard.py", line 48, in all_and_not_empty
    bool_list = list(bool_iterable)
  File "/Users/dalepotter/Documents/IATI-Stats/stats/dashboard.py", line 1102, in <genexpr>
    valid_coords(x.text) for x in bools['location_point_pos']),
  File "/Users/dalepotter/Documents/IATI-Stats/stats/dashboard.py", line 246, in valid_coords
    coords = x.split(' ')
AttributeError: 'NoneType' object has no attribute 'split'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants