Closed CPrompt closed 6 years ago
Notabug, part of metrification effort. ;)
I don't think that's the case. Weather.com recently changed the format of their weather data, so if you're not running from the upstream master
branch then Weather.com probably won't work for you.
Also, @CPrompt, in the example you posted, there is no comma after the units
param. Maybe that's also part of the problem?
Can you update to the latest from upstream?
Relevant fix was made just 9 days ago in bfdff2ed
@terminalmage That was my bad copy/paste from vim. I do have a comma after units and I did a pull on master prior to posting.
Strange that if "units=imperial" is there at all, no data is outputted but in the debug log, it shows the json and at the end "Failed to read weather data from page. Run module with debug logging to get more information."
Here is a link to my complete config for that monitor if it matters: https://github.com/CPrompt/configs/blob/master/i3/i3pystatus/config_monitor1.py
@CPrompt you can't just use the ZIP code, you need the full location code. The reason for this is because Weather.com no longer exposes a URL where you can request the JSON feed, they stopped doing that a couple years ago. Instead, all the weather data is loaded at the time the page is rendered and the JSON is injected into the page source within a <SCRIPT>
tag.
The way to get the location code you need would be to first search for your location, and then grab the bit after the last slash in the URL. So, for the ZIP code you posted, the location would be 27265:4:US
.
@terminalmage strangely enough if I leave it like that and nothing for UNITS it does pull the data. But, using your suggestion as well as what is on my config commented out (USNC0314:1:US) still the same result.
Thanks
USNC0314:1:US
works for me.
Like I said earlier, Weather.com changed the structure of their JSON weather data a couple weeks ago, so I added bfdff2e to fix this. If you are not running from a recently-updated git clone of i3pystatus, it's probably not going to work as expected.
Well, did a fresh git clone and copied files over and it now works.
Thanks!
I live in the US and if I give the location code, the temp shows as C instead of F. If I add "units=imperial" then no data shows at all.
Debug log shows the data but nothing shows in i3pystatus bar.
Here is that part of my config: