This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

incith:weather (2.8p) (Dec. 18th, 2008)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
s
sn0r
Voice
Posts: 2
Joined: Mon Jun 25, 2007 11:05 am

Post by sn0r »

Hi incith,

After many years of enjoying your script it started doing the following all of a sudden during requests which ended in multiple results:

Code: Select all

04:45PM <dogbert> Multiple Results Found: Berlin, Connecticut</a><a href="/US/CT/Berlin.html#PUB"><img
          src="http://icons-aa.wunderground.com/graphics/PUB.gif" alt="Public Information Statement" height="17" width="17" />; Berlin, Florida; Berlin,
          Georgia; Berlin, Germany; Berlin, Illinois</a><a href="/US/IL/Berlin.html#FOG"><img src="http://icons-aa.wunderground.com/graphics/FOG.gif"
          alt="Dense Fog Advisory" height="17" width="17" /></a><a
04:45PM <dogbert> href="/US/IL/Berlin.html#PUB"><img src="http://icons-aa.wunderground.com/graphics/PUB.gif" alt="Public Information Statement" height="17"
          width="17" />; Berlin, Maryland; Berlin, Massachusetts</a><a href="/US/MA/Berlin.html#PUB"><img
          src="http://icons-aa.wunderground.com/graphics/PUB.gif" alt="Public Information Statement" height="17" width="17" />; Berlin, Michigan</a><a
          href="/US/MI/Berlin.html#PUB"><img
04:45PM <dogbert> src="http://icons-aa.wunderground.com/graphics/PUB.gif" alt="Public Information Statement" height="17" width="17" />; Berlin, New
          Hampshire; Berlin, New Jersey</a><a href="/US/NJ/Berlin.html#PUB"><img src="http://icons-aa.wunderground.com/graphics/PUB.gif" alt="Public
          Information Statement" height="17" width="17" />; Berlin, New York</a><a href="/US/NY/Berlin.html#PUB"><img
          src="http://icons-aa.wunderground.com/graphics/PUB.gif"
I narrowed it down to problems with the following line on line number 475 and the preceeding regexp (i think).

Code: Select all

set output(error) "Multiple Results Found: ${loop_reply}"
Hope it helps. I really enjoy your scripting, by the way. Keep up the brilliant work!

Edit: sorry I missed your changelog for 2.7 at the end there. Seems you've already seen the problem. My apple-ogies for the double. Perhaps the line number will help people write a little work around until you get the new version up.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

sn0r wrote:Perhaps the line number will help people write a little work around until you get the new version up.
line 475:

Code: Select all

regexp -- {<td class="sortC"><a href=".+?">(.+?)</a>(?:</td>|  <a href.+?><img.+?>)} $html - loop_loc
change to:

Code: Select all

regexp -- {<td class="sortC"><a href=".+?">(.+?)</a>} $html - loop_loc
@incith, your new version looks feature rich, i like it..hehe.. looking forward to it ;)
s
sn0r
Voice
Posts: 2
Joined: Mon Jun 25, 2007 11:05 am

Post by sn0r »

Thanks speechles; I'm a klutz at regexps. ;)
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

I'm always available on IRC generally, and will usually have a CVS version if something breaks.

Version 2.7 has been released. Please see the first post for more details.
speechles wrote:@incith, your new version looks feature rich, i like it..hehe.. looking forward to it ;)
Yeah, 2.7 is kind of nice. :) Thanks!
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

If you are getting the silly 'unable to convert date/time' string error, it's because I forgot to strip out the timezones from the local_time and local_date variables that I added last-minute in 2.7.

I released 2.7a now to fix this problem.

Regards,
G
Gordon
Voice
Posts: 35
Joined: Wed Apr 04, 2007 11:45 am

Post by Gordon »

WIth some cities I get this error:

Code: Select all

Tcl error [incith::weather::weather_handler]: can't read "output(update_time)": no such element in array
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

Can you give examples of the cities? I will work on this as soon as I get a bit of free time.
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

Version 2.8a has been released, fixing multiple results for India. What I've done is, when looking at the wunderground page and searching for india I noticed not all locations have temperatures and the like, so if you are doing a search and searching for a location that has multiple results, the script will remove locations without temperatures, giving you a multiple results list with only available locations. This significantly reduced the size of results given with a "!weather india", which is still 3 paragraphs for me.

There will probably still be a few instances of "cannot read update_time" but not as many and if you encounter any please come and post which search broke it for you.

As always it'll be available on the Tcl archive soon and is available now @ incith.com

Edit: 2.8a has since been posted to incith.com to fix some more things with multiple results -_-

Edit #2: I realise there are still some issues now.. notably searching for Australia doesn't do anything useful. I'll have to work on these in due time.
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

2.8c has been submitted and is available @ incith.com :)

2.8c:

Code: Select all

#  2.8c: fixed conditions/location/todays_day/UV, and astronomy.      #
One more quick release available on the first post, 2.8d, will fix location problems and forecast.
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

2.8e is available on incith.com which resolves the forecast not working.

http://incith.com/eggdrop/
j
johne
Voice
Posts: 29
Joined: Tue Jul 19, 2005 2:24 am

Post by johne »

temps are now not displaying *curses wunderground*
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

I have been making constant updates and fixes to the script the last couple of days, please keep checking incith.com/eggdrop/ for the latest release candidate version (currently 2.8f-rc4). If you are having problems with your location then please feel free to e-mail me or come on IRC and we'll get it fixed up in no time. :)
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

2.8g has been submitted and released tonight to solve various things not displaying (wunderground decided to randomly add back <nobr> tags, so whatever they do with them now it doesn't matter).

Available @ incith.com until the Tcl archive updates as well.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Getting to be a real pain in the arse aren't they =p

Shame METAR doesn't provide more data, at least that format doesn't change.
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

Yeah, they are, and then I forgot some crap too.. *sigh*

Oh well, if anyone downloaded 2.8g in the last couple hours, you may want to download it again, as I just couldn't warrant going up to 2.8j or so within a couple hours, heh.

If your version of 2.8g does not work with !sky then you will want to download it again.
Post Reply