Closed (fixed)
Project:
Weather
Version:
4.5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Anonymous (not verified)
Created:
6 Sep 2004 at 21:42 UTC
Updated:
4 Nov 2006 at 13:26 UTC
Jump to comment: Most recent file
Comments
Comment #1
(not verified) commentedI also get this error
Comment #2
(not verified) commentedYou can just go here, http://www.weatherroom.com/add.html, and make your own, instead of using the module.
Comment #3
AFL commentedI have weather.module working again by searching for ° and replacing it with a " " at line 552 of the 4.4.0 version.
// $Id: weather.module,v 1.85 2004/04/17 20:22:20 freedom Exp $.
552a553,554
> $weather_input = preg_replace("|°|", " ", $weather_input); //AFL
>
Comment #4
AFL commentedThe ° is control character & # 0176;
Comment #5
gerardryan commentedgreat piece of deduction there. thank you.
i'm not quite sure what happened here at drupal.org regarding this module's development. i took a brief reprieve to tend to other projects (away from my computer) and when i last checked in, another developer was working on the module... now it seems all of his work is *gone*
... funny, too, because no one bothered to contact me and say "hey, i'm filling in for ya while you're away!" ... :-(
anyway, i'll be adding this in quite shortly.
in other news... i'm going to start up work on a completely overhauled module that will bypass weatherroom.com altogether and fetch/parse raw METAR data. i had been meaning to do this forever, but ultimately i was beseiged by laziness. it was far easier to parse an XML feed than to learn METAR codes and write a bunch of complicated regex to translate it into civilian-legible weather updates. also, METAR is forecast-stupid, so there would be the additional task of fetching/parsing TAF data as well. anyway, i've got a good leg up on development (thanks to some contributed code from another developer) and i should have this going Sometime Soon.
again, thanks for your solution!!
Comment #6
nv1962 commentedPardon this n00b - but in the cvs version I can't find the suggested lines to patch...
Here's what I have on lines 552, 553 and 553:
And lines 350, 351 and 352 -- where I found the named entity for the degree symbol -- look very different from what AFL showed:
Should I smite myself? :-)
P.S.: I had to place a space in the degree entity in the snippet above to avoid browser snafu. Also, the "problem" of not working temp is not just with the cvs version - also have it with 4.4.0.
Comment #7
nv1962 commented(sorry - no real follow-up, I just realized I had changed the title for the whole thread here, so I now set it back to the way it was... yup I'm a n00b here)
Comment #8
mikeryanHere's a patch against the 4.4 version (1.85). Two aspects of the patch:
The TEMP tag was being invoked three times - once for the temperature value, once for the °, and once for the F - only the last one was called. I modified the code to accumulate the values (this probably should apply to all of the character data, but I didn't want to mess with anything else without a demonstrated problem).
After this, the degree sign was showing up as a ?, so I applied the original suggested fix in the TEMP tag handler to translate it to °.
Comment #9
nv1962 commentedYay! Thanks Mike! It works now. One observation: your fix made the temperature work again - but the dewpoint and heatindex ("Feels like") still came up "empty" after applying your fix. So, what I did is take a plunge and apply your suggested changes also to the corresponding bits (windchill, heatindex, and dewpoint - immediately below the temp block starting at line 617)
Hope that was useful... Thanks again for making the weather thingie work!
Comment #10
toddy commentedHi,
I've taken over maintainership of this module and have uploaded a new version which works with Drupal 4.7. This issue should be fixed, because weatherroom.com is no longer used for downloading the data, so I'm closing it. If you don't agree, feel free to file another issue against the weather module.
Regards,
Tobias