It is currently July 13th, 2024, 3:47 pm

Weather Skins Not Working

Get help with creating, editing & fixing problems with skins
User avatar
SilverAzide
Rainmeter Sage
Posts: 2683
Joined: March 23rd, 2015, 5:26 pm

Re: Weather Skins Not Working

Post by SilverAzide »

SnowyNights wrote: June 15th, 2024, 11:46 am
Notice the message in your screenshot of the log "No results for that location." Perhaps it's just a temporary glitch on TWC's side. Try a different location to see if it works.
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Rainmeter Sage
Posts: 7719
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

SnowyNights wrote: June 15th, 2024, 11:46 amI'm still using JDWS-04 with some updates to it that were provided a little while back to fix the WeatherParsing.
SilverAzide wrote: June 15th, 2024, 3:01 pmNotice the message in your screenshot of the log "No results for that location." Perhaps it's just a temporary glitch on TWC's side. Try a different location to see if it works.
SilverAzide is correct in that the problem relates to your location, however it has nothing to do with the TWC site, but with what else than Nominatim, again. Yes, it happens to me as well, even after installing the latest release. I suppose the "update" you were talking about is the one I posted here:
https://forum.rainmeter.net/viewtopic.php?p=216878#p216881
which, in the meantime, was also applied with small changes by JelleDekkers, the author, in the latest release:
https://github.com/adriaanjelle/JDWS-04/releases
So, download and install that latest release, but follow SilverAzide's advice here:
https://forum.rainmeter.net/viewtopic.php?t=43228#p222942
and similarly edit the ...\JDWS-04\@Resources\WeatherParser.inc file to replace the UserAgent line from the [mWeatherLocationParent] measure with, say:

Code: Select all

UserAgent="#ROOTCONFIG#/2024-05-17 (powered by Rainmeter)"
That fixed the issue for me, hopefully it will for you too. I don't know how much it will last since that depends on Nominatim, but for now it should work.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
SnowyNights
Posts: 4
Joined: August 9th, 2023, 6:39 pm

Re: Weather Skins Not Working

Post by SnowyNights »

Yincognito wrote: June 15th, 2024, 5:12 pm SilverAzide is correct in that the problem relates to your location, however it has nothing to do with the TWC site, but with what else than Nominatim, again. Yes, it happens to me as well, even after installing the latest release. I suppose the "update" you were talking about is the one I posted here:
https://forum.rainmeter.net/viewtopic.php?p=216878#p216881
which, in the meantime, was also applied with small changes by JelleDekkers, the author, in the latest release:
https://github.com/adriaanjelle/JDWS-04/releases
So, download and install that latest release, but follow SilverAzide's advice here:
https://forum.rainmeter.net/viewtopic.php?t=43228#p222942
and similarly edit the ...\JDWS-04\@Resources\WeatherParser.inc file to replace the UserAgent line from the [mWeatherLocationParent] measure with, say:

Code: Select all

UserAgent="#ROOTCONFIG#/2024-05-17 (powered by Rainmeter)"
That fixed the issue for me, hopefully it will for you too. I don't know how much it will last since that depends on Nominatim, but for now it should work.

That did infact fix the issue for me also so I appreciate the fix, I didn't even realize the UserAgent line could actually cause problems like that, I was originally using the older version of JDWS-04 with previous fixes but it still uses the same Parsing methods, so that'd mean the UserAgent was what broke also on the older version too. Thank you for the fix though, I greatly appreciate it as always!
User avatar
Yincognito
Rainmeter Sage
Posts: 7719
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

SnowyNights wrote: June 16th, 2024, 12:55 pm That did infact fix the issue for me also so I appreciate the fix, I didn't even realize the UserAgent line could actually cause problems like that, I was originally using the older version of JDWS-04 with previous fixes but it still uses the same Parsing methods, so that'd mean the UserAgent was what broke also on the older version too. Thank you for the fix though, I greatly appreciate it as always!
Well, it was SilverAzide who suggested using this based on that GitHub thread, but you're welcome anyway, we're glad we could help! ;-)

P.S. By the way, you could let JelleDekkers know of this change in the JDWS-04 thread on this forum, in case he doesn't read this.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
matif
Posts: 3
Joined: September 20th, 2023, 5:19 am

Re: Weather Skins Not Working

Post by matif »

Yincognito wrote: June 15th, 2024, 5:12 pm

Code: Select all

UserAgent="#ROOTCONFIG#/2024-05-17 (powered by Rainmeter)"
That fixed the issue for me, hopefully it will for you too. I don't know how much it will last since that depends on Nominatim, but for now it should work.
Would it be possible to tell me why? What does "ROOTCONFIG" and the date mean?
User avatar
Yincognito
Rainmeter Sage
Posts: 7719
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

matif wrote: June 20th, 2024, 2:41 am Would it be possible to tell me why? What does "ROOTCONFIG" and the date mean?
Sure - regarding ROOTCONFIG:
https://docs.rainmeter.net/manual/variables/built-in-variables/#SkinVariables
The date is just how the versions of JDWS-04 (the skin suite I was talking about earlier) are written by its author, JelleDekkers.

Basically, setting the UserAgent (i.e. the string identifying the browser or program that requests data from a site) to the name of the skin and its version helps in complying to the terms of service from Nominatim / OpenStreetMap, so you can better use their reverse geolocation data in such skins. This happened because some Rainmeter users allegedly abused connecting to Nominatim in the recent past, so sending the details about the program, skin and version connecting to the service helps to block / ban misbehaving skins or those using them.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16389
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather Skins Not Working

Post by balala »

Everything is confusing related to the UserAgent. UserAgent=Powered by Rainmeter is also working for Nominatim. But just tried and right now no UserAgent is required. Removing this option from the parent WebParser measure, lets the measure working. :confused:
User avatar
Yincognito
Rainmeter Sage
Posts: 7719
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

balala wrote: June 20th, 2024, 6:29 pm Everything is confusing related to the UserAgent. UserAgent=Powered by Rainmeter is also working for Nominatim. But just tried and right now no UserAgent is required. Removing this option from the parent WebParser measure, lets the measure working. :confused:
Not that confusing, IMHO. Even without an UserAgent option added to the parent measure, a WebParser measure will, in fact, use the "Rainmeter WebParser Plugin" user agent:
https://forum.rainmeter.net/viewtopic.php?t=34734&start=300#p178746
so basically still "being honest" and present itself as Rainmeter based (and not some browser, for example), just like "Powered by Rainmeter" does.

Meanwhile, the OpenStreetMap terms of service are against "user agent spoofing", which, in non technical terms, means pretending who you're not to the site you connect to, and is incidentally associated with various types of shady automated behavior online (e.g. bots, etc). This might explain why the choices you tried worked, but a browser user agent doesn't, at least in the case of Nominatim.

By the way, when you say "the parent WebParser" are you referring to a WebParser connecting to Nominatim, or to the actual weather site? Cause this thing against user agent spoofing is at the moment the case for Nominatim, and not yet for the weather sites themselves (who actually expect to see a "browser" connecting to them, you know, for ads / commercial reasons and stuff)...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16389
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather Skins Not Working

Post by balala »

Yincognito wrote: June 20th, 2024, 7:01 pm By the way, when you say "the parent WebParser" are you referring to a WebParser connecting to Nominatim, or to the actual weather site? Cause this thing against user agent spoofing is at the moment the case for Nominatim, and not yet for the weather sites themselves (who actually expect to see a "browser" connecting to them, you know, for ads / commercial reasons and stuff)...
I was talking about Nominatim. But right now it is working even without UserAgent. Same way as it is working with any UserAgent, it seems (obviously by any USerAgent I mean the ones I tried, but none of those did prevent the measure to work).
But just tried: right now even weather.com is working without UserAgent added, it seems. However I had it set to UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 and I think I keep this option on the measure.
Nightmare...
User avatar
Yincognito
Rainmeter Sage
Posts: 7719
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

balala wrote: June 20th, 2024, 7:59 pmbut none of those did prevent the measure to work
Not even the ones pretending to be a browser (like in your snippet mentioned afterwards)? :jawdrop
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth