In case of no internet connection at the startup of the os, the weather block shows a block error and overrides the rest of the status bar.
Ref: https://github.com/greshake/i3status-rust/blob/master/src/blocks/weather.rs#L88-L91
A better solution should be to implement a cache for the weather requests. In case of no connection, the weather block shall always be updated from the cache.
Also, the current error is not even related to the problem.
Hmm, the code is definitely designed not to error out if there's no internet -- see the few lines above what you referenced. This may be due to an incorrect assumption about how curl will behave in that case.
@atheriel The code is designed to not error out if there is no output from the curl command.
ref: https://github.com/greshake/i3status-rust/blob/master/src/blocks/weather.rs#L82
Which means that for some reason the curl returned an invalid JSON.
ref: https://github.com/greshake/i3status-rust/blob/master/src/blocks/weather.rs#L88-L91
So I suppose that you are right, and the error was not occurred because of the no internet connection, but something else. I will try to debug it.
In any case, we should not output that error, instead, we should read the weather from a cache. Also, we can play with the colors for how old is the cache's information. For example yellow for older than 12h, and red for older than 24h.
There are two issues here. First, it seems that the weather block is still buggy if the internet is out. We should fix that. Second, you're proposing a cache for weather updates. I'm not so keen -- I think a cache is overcomplicated, for very little benefit.
Can confirm. Updated to latest aur package. Though I have noticed this before. When I'm on laptop using wifi and system boots up before I get connection I have to manually reload i3 in order to get weather data.
perhaps we can just return an empty block if anything flakes out? I keep needing to reload i3 to fix this (which has been happening at least once a day)

Surfacing unanticipated errors to the user is still the right decision, in my view. We just need to be better at handling this particular error better.
@atheriel understood, but maybe it could recover if the API starts working again? Maybe just kill the one block (display: can not fetch weather) and display all the rest of the blocks?
We shouldn't print the curl's response error in the status bar, but instead to do something else, like notification or a small window above the weather block.
Just installed i3status-rust and it's quite good! But I too am having this issue, multiple times a day. Perhaps the cached weather could be shown but with an icon depicting that an error has occurred. This would indicate for people to look in logs for the error.
I'm unable to reproduce this - I believe https://github.com/greshake/i3status-rust/commit/a31f44492d2423a80c230d1c555a0b493dc4248d solved this issue. Please re-open if otherwise.
Most helpful comment
Just installed i3status-rust and it's quite good! But I too am having this issue, multiple times a day. Perhaps the cached weather could be shown but with an icon depicting that an error has occurred. This would indicate for people to look in logs for the error.