open-reblock / localco.de

http://beta.openreblock.org
3 stars 2 forks source link

Celery has started throwing errors #53

Closed ericsoco closed 9 years ago

ericsoco commented 9 years ago

Not sure what is going on, but now every time I try to load shapefiles (same ones I've been using successfully previously for testing), celery throws errors like this:

Task tasks.run_topology[f11b2668-0566-496b-a0e9-41ec2c5d4b1d] raised unexpected: TypeError("argument of type 'NoneType' is not iterable",)

Therefore, I can't upload any more files for testing.

ericsoco commented 9 years ago
Traceback (most recent call last):
  File "/home/ericsoco/localcode/venv/local/lib/python2.7/site-packages/celery/app/trace.py", line 238, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/ericsoco/localcode/venv/local/lib/python2.7/site-packages/celery/app/trace.py", line 416, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/ericsoco/localcode/tasks.py", line 37, in run_topology
    blocklist = new_import(lst,name,scale = scale_factor, indices=indices)#make the graph based on input geometry
  File "/home/ericsoco/localcode/reblock/reblock_helpers.py", line 295, in new_import
    barriers = match_barriers(indices, original)
  File "/home/ericsoco/localcode/reblock/reblock_helpers.py", line 263, in match_barriers
    if "," in b_index:
TypeError: argument of type 'NoneType' is not iterable
mojodna commented 9 years ago

I noticed that you dropped the "barrier" input. Might be related to that?

mojodna commented 9 years ago

(though I did see it working...)

@brelsford any ideas?

brelsford commented 9 years ago

it looks like the problem is that the match_barriers function doesn't handle the case where there are no barriers at all in the input. (This is also the most typical case).

https://github.com/open-reblock/localco.de/blob/master/reblock/reblock_helpers.py#L255

ericsoco commented 9 years ago

Hm, that might make sense. I dropped it at @saraedean's suggestion, since entering some values (not sure which are valid and which are not) can cause other errors. I can put it back in, perhaps there was a default value submitted previously.

ericsoco commented 9 years ago

@brelsford @mojodna that was the problem. Cleared the celery queue and added the Barrier Index input back in, and everything is running smoothly. Thanks!