NEED HELP WITH BUG

I found a bug that seems to be in all the skins.

Go to the daily forecast screen of your skin…see that the wind direction of the night is the same as the day…every day. I checked weather.com, and what they show is not the case.

I was able to correct Barba’s daily forecast skin when it came to the text of the wind direction at night, but was unable to correct the arrows, which still are the same of the day.

I need the help of those who are more experienced than I am when de-bugging a skin and help me with getting the arrow to point correct.

Check out daily.wtp in the skin, which you can download at
http://webpages.charter.net/david1970/MarmolEn.zip

David

To make it easy on all of us in trying to fix this bug, let’s focus on a specfic city…Tokyo, Japan.

The fixed skin has the text right on the daily forecast screen, but the arrows are the same as the day forecast. What makes it difficult is that in current.wtp, the day has two varibles, one for direction and another for speed, but the night only has one variable, called “DAILY WIND FULL NIGHT”. That makes it hard to get the arrows right. I may have to get rid of all the arrows entirely, but that would mean admitting defeat, which is not in my nature :razz:

So I am asking the Weather Watcher pros, how can this problem be solved?

David

that problem seems to be of the data base of weather.com not of skin

Compare the Tuesday forecast winds in Toyko on the Weather Channel with this link

http://www.weather.com/outlook/travel/b … 5?dayNum=1

with the fixed skin at the Daily Forecast screen

http://webpages.charter.net/david1970/MarmolEn.zip

It’s now correct.

Now compare the weather.com link with any other skin.

There will be a bug.

The same is true for anywhere.

David

The key is the variable in current.wtp

DAILY WIND FULL NIGHT is the variable that contains the wind direction and speed. When used in daily.wtp, it gives the correct reading in there too. Trying to seperate the night wind direction from the night wind speed will produce a bug.

David

I tried several other cities and with the same result.

All I did was to put “DAILY WIND FULL NIGHT” that was in current.wtp and also put it into daily.wtp

David

To prove my point, go to a city that has N/A for Monday afternoon, such as Baghdad, Iraq, uising any skin other than Barba’s.

The night wind shows the wind direction as N/A in all skins.

Why?

Because it copied the value of the N/A of Monday afternoon.

The night wind should be NNW, according to both the Weather Channel and Barba’s fixed skin.

David

True, there’s a bug in the template codes, which in turn might very possibly come from the weather.com data.
My contribution however is just to optimize your fix a little, since you don’t have to check for every single possibility, when you know how the data is formatted. And oh, I used the NO GUST tag, since that holds the correct data, but no gusts [though I’ve never seen them in action?]

var oest = '[DAILY WIND NO GUST NIGHT]'; var wind = oest.substr(0, oest.indexOf(' '));
The script, this way, simply takes anything up to the first space-character, which should be just what is needed…

Thanks for the hint about the bug, though :slight_smile:

Take a look at the daily.wtp of Barba’s skin at

http://webpages.charter.net/david1970/MarmolEn.zip

I fixed the night wind text, and he fixed the arrows.

The night wind directions on the daily forecast screen of his skin are the same as weather.com

In the current.wtp file, the night wind direction and speed is [DAILY WIND FULL NIGHT] , but it was referenced in daily.wtp as [DAILY WIND DIRECTION NIGHT] , as a result, it was ignoring the nightly wind direction and just used the day wind direction for the night.

The problem I had in correcting it was that NOBODY had the right code for the night wind direction in their daily.wtp files, so I couldn’t study their daily.wtp file for answers. I just literally made a lucky blind guess out of the dark and it worked. However, while I got the text wind directions right, I couldn’t get the arrow graphic to corresspond. Barba took care of the arrows.

It’s certainly an interesting bug!

David

Your script looks like it could work, but I know NOTHING on how to make a skin, so I wouldn’t know. I’m a total novice at this.

You would be amazed how I de-bugged Barba’s skin. I don’t know the language. I just do trial and error guesses until I get it right. Some of the code in Barba’s skin makes sense to me, but most of it looks like Greek to me. I was just lucky that all of the bugs in Barba’s skin were in places where I could interpret the language.

David

Well, you’re partially right, the [DAILY WIND FULL NIGHT] is used in places where all the wind information should be displayed, since that’s what that code is for. In the same way should the [DAILY WIND DIRECTION NIGHT] be used for displaying the wind direction on the given night. And knowing a little of Mike’s previous work, the codes are implemented equally correct, and the bug is in the data TWC broadcasts. And on a side note, if the code wasn’t implemented at all, it would just be printed right in the skin itself.
A complete [though I just found out, it’s not entirely up-to-date] list of codes can be found in the WW manual.

The problem was that there was no problem, just faulty data. And since it’s next to impossible to get TWC to fix it, there had to be made a workaround, which you did quite good - especially if you don’t know the languages used!!!
Though the fix is kinda trivial, I think the bug is one of those you hardly ever catch, so that’s quite nicely found!
And I just realized that my code probably wouldn’t handle calm winds, so this should do the trick a bit better :wink:

if([DAILY WIND PLAIN NIGHT]!=0) { var oest = '[DAILY WIND NO GUST NIGHT]'; var wind = oest.substr(0, oest.indexOf(' ')); } else { var wind = "Calm"; }
Hope I could help to clarify a bit, and that I made any sence in the first place… If there’s anything else, just ask away, and I’ll look in to it… I haven’t messed with the marmol skin yet, but read pretty much every single line of Mike’s and EdP’s skins, and ofcourse my own, a couple of hundred times, so I know a little of the inner workings…

Well, gotta catch a couple of hours of sleep now… See ya

The difference between the current Barba daily.wtp file and the otherl daily.wtp files is that the other daily.wtp gets the nightly wind direction wrong. The others daily.wtp file just repeats the afternoon’s wind direction.

For example

Let’s say weather.com says Friday afternoon wind direction will be South 5MPH, while Friday night’s wind direction will be Northeast 10MPH.

Here’s what the others daily.wtp would say:
Friday afternoon: South 5MPH
Friday night: South 10MPH

Here’s what the Barba’s daily.wtp would say:
Friday afternoon: South 5MPH
Friday night: Northeast 10MPH

See the problem?

David