boramalper / himawaripy

Set near-realtime picture of Earth as your desktop background
http://labs.boramalper.org/himawaripy
MIT License
1.62k stars 239 forks source link

How to set fallback image #82

Closed Jeffwhen closed 6 years ago

Jeffwhen commented 7 years ago

Sometimes the image requirement fails, then the desktop went all black with grided text. So I am wondering is there a way to set a fallback option.

sg-s commented 7 years ago

I think that this is a problem, and a good way to solve this is for himawaripy to check if it can actually get an image. If it's simply tiles of "no image", it should fall back to the last "good" image. thoughts?

jcmiller11 commented 7 years ago

I believe this may be a regression due to the fixing of this issue: https://github.com/boramalper/himawaripy/issues/70

Line 105 of himaripy.py deletes the old file without checking if the whole download was successful, and the nested try blocks during the download only prevent Line 105 from being run if the mode of failure was a timeout during one of the image downloads I think. Should be a pretty easy fix.

boramalper commented 7 years ago

Hello,

this used to happen due to a problem in time logic of himawaripy (long story short, it tried to fetch images of earth from the future some times :) ).

Can you please make a clean installation of v2 (https://github.com/boramalper/himawaripy/tree/v2) and let me know if it fixes your problem?

Thanks!

boramalper commented 6 years ago

I assume the problem has been solved, let me know if it still persist. Thanks!