rickmcgeer / TransCloud

Software for the TransCloud project
5 stars 1 forks source link

Missing images should not crash the client #36

Closed cmatthew closed 11 years ago

cmatthew commented 11 years ago

When there are no images for an area right now

ile "mq_client.py", line 33, in process_cities
green_results = greenspace.process_city(id,name,poly,(bb1,bb2,bb3,bb4),"all", testing=testing)
File "/usr/local/src/greencities/greenspace.py", line 217, in process_city lsimg.getImgList(pgConn)
File "/usr/local/src/greencities/landsatImg.py", line 180, in getImgList
assert len(records), "No data crawled yet"
AssertionError: No data crawled yet

Really we should catch this and keep processing the next city.

stredger commented 11 years ago

right, so before i had the whole thing wrapped in something to catch assertions, print them, then keep going. How should we actually be handling errors like this?

cmatthew commented 11 years ago

I’ve set it up so it keeps going and sends an error back to the server.

On 2013-02-25, at 1:18 PM, stredger notifications@github.com wrote:

right, so before i had the whole thing wrapped in something to catch assertions, print them, then keep going. How should we actually be handling errors like this?

— Reply to this email directly or view it on GitHub.

cmatthew commented 11 years ago

We are still doing that. And logging them. Some errors though we should probably take the city out of circulation. On 2013-02-25, at 1:18 PM, stredger notifications@github.com wrote:

right, so before i had the whole thing wrapped in something to catch assertions, print them, then keep going. How should we actually be handling errors like this?

— Reply to this email directly or view it on GitHub.

cmatthew commented 11 years ago

Also, I think we need to be selective about what error we crash on.

For instance, just go to next city on missing images errors, but stop the program on IOErrors like permission denied (currently happening), or out of disk space. Those sorts of things. On 2013-02-25, at 6:25 PM, Chris Matthews chris4000@gmail.com wrote:

We are still doing that. And logging them. Some errors though we should probably take the city out of circulation. On 2013-02-25, at 1:18 PM, stredger notifications@github.com wrote:

right, so before i had the whole thing wrapped in something to catch assertions, print them, then keep going. How should we actually be handling errors like this?

— Reply to this email directly or view it on GitHub.

cmatthew commented 11 years ago

Done. MissingCoverage error is thrown.