Main index > About existing desklets > weatherforecast

By Bitpicker (User), on Wed Mar 16 05:06:25 2005: Weather Forecast problem.

I'm having problems with the weather forecast desklet. The location name for a location outside the US is too long, so that it runs into the first forecast:

http://www.nyboria.de/images/wfs.jpg

Is there any way to

a) change the spacing of the elements, preferably put the three forecasts underneath the current weather;

b) get rid of the current weather element, so that I can put the three forecast icons underneath the standard weather desklet?

Robin

By jeepston (Desklet Author), on Wed Mar 16 12:09:16 2005.

I can offer another way to solve the problem: just cut off the second part of location. That is, you will see just the name of the city. Is it ok?

By Bitpicker (User), on Wed Mar 16 17:28:01 2005.

That might help, only I don't know how. I don't understand enough of the source code. And I think I'd prefer using only the three forecasts and the standard weather desklet, so I can use them in a vertical alignment.

Maybe that could be made configurable in a future version?

I also have the text size problem, as can be seen in my screenshot. Right now, as I am typing this, the city is small but the other entries in current weather are large. They were all small five minutes ago.

Robin

By jeepston (Desklet Author), on Thu Mar 17 00:45:05 2005.

The problems with the fonts and location title are fixed in 0.1.2 version.

And I'll think about separation current conditions from forecast. It may be another config option :)

By falcon_za (User), on Fri Mar 18 11:07:36 2005.

jeepston wrote:

And I'll think about separation current conditions from forecast. It may be another config option :)


I too would be glad to have this.

I also would appreciate having an (optional?) background image, possibly similar to the one in the original weather desklet. or the possibility to configure font color. or both. But with both missing, it is simply unreadable on so many wallpapers. That's a pity, because except this, this desklets does exactly what I want.

By DrWoland (Desklet Author), on Fri Mar 18 11:23:20 2005.

I believe a semi transparent bar with a border with the opacity, color(s), and font colors customizeable would be the best solution to the issue of visibility. My .02, I am just a big fan of boxes :P

By alec (User), on Thu Mar 24 19:34:00 2005: not connected icon when not on network?.

Is there any way to display a not-connected icon if my laptop is not on the network? At the moment, it crashes on the "seed(urllib.urlopen(url))" command in xmltramp.py.

By jeepston (Desklet Author), on Thu Mar 24 20:09:00 2005.

Thanks for the hint. Will include it into the next release.

By syfou (Core Developer & Desklet Author), on Mon Apr 4 00:56:51 2005.

Hi Jeepston,

I went over your code a little, because I wanted a feature currently not implemented, and I realize what you meant about your weather.com data parser being "crufty". ;-) So here is my html-highlighted rewrite, and the original python code.

Another thing: would you consider not including the three icons sets in the base package, but fetching it from an online location (possibly with a cache mechanism) as needed? I put everything online already. I will do so in my next update of weather.

By yogi77 (Core Contributor), on Mon Apr 4 04:46:11 2005.

Hi Jeepston,

I just installed the weatherforecast desklet and I like it! :D
But I'd also like to "localize" it because I'm a German... :wink:

I don't know much about xmltramp yet (I'm afraid I have to look at it), but is it possible to process a "german" xml-feed, let's say something like de.weather.com (I know, they don't provide -as far as I know- xml-feed, but I know there are services in Germany, just forgot the name...) ?

By syfou (Core Developer & Desklet Author), on Mon Apr 4 06:03:06 2005.

yogi77 wrote:


But I'd also like to "localize" it because I'm a German... :wink:

I don't know much about xmltramp yet (I'm afraid I have to look at it), but is it possible to process a "german" xml-feed, let's say something like de.weather.com (I know, they don't provide -as far as I know- xml-feed, but I know there are services in Germany, just forgot the name...) ?


I cannot answer you about xmltramp... I can only tell you it is a fragile piece of code, hard to read (at least for me), and harder to modify. My Weather class is far cleaner and easier to read and adapt in my opinion: it natively supports unicode characters; you only have to change Weather::_to_ascii back to a dummy function.

As for weather in german, I could not find the appropriate xml service neither... From weather.com's sdk, it doesn't seam to exist there... One way out would be to provide manual translation tables (Windy Rain: windiger Regen, Fog: Nebel, etc.). Here is the complete list as far as I figured it out. You would also need to translate other textual elements, as given in this DTD.

By jeepston (Desklet Author), on Tue Apr 5 21:35:24 2005.

2 syfou

1. Thank you for the parser. I took a very short look at it and it looks good. Later I'll study it in details.

2. I thought about placing icon themes separately from the desklet but I don't want to use my personal or university web-pages for it. So thanks for the offer to have it on the project web-site. But still I think I will provide it at least with one of the icon themes (weather.com).

2 yogi77

Thank you for the positive feedback :lol: Unfortunately I will not have time for the weatherforecast desklet for approximately 2 weeks. But I'll think about localization of it. Meanwhile, can you provide me with the translation of the terms from the syfou's condition list and translation of the weekdays? It would be helpful, because I don't speak German.

By syfou (Core Developer & Desklet Author), on Wed Apr 6 02:27:33 2005.

jeepston wrote:

I thought about placing icon themes separately from the desklet but I don't want to use my personal or university web-pages for it. So thanks for the offer to have it on the project web-site. But still I think I will provide it at least with one of the icon themes (weather.com).


Well, the sourceforge web server is pretty reliable for static content (99.9% of availability), thus do not be affraid to use this bandwidth, since this is something allowed (I closely looked at my usage aggreement, and everything seems fine).

I do not understand the rationale for keeping the weather.com icon set included though... The weatherforecast desklet data-retrieving is network-dependent anyway, so the only image you really need locally to reasonnably cover all cases is the error/Not available icon, isn't it? The odds of having access to weather.com while not having access to sourceforge are rather low... This is further reduced if you implement some local image caching. But, well, it's your final call, really.

By Ryanx0r (User), on Thu Apr 7 10:58:37 2005.

Hey guys, like the weatherforecast desklet. But there are a few things (possibly this could be system related, I'm not sure, but I thought I'd ask).

Now, I started the desklet with the liquid theme, and then it crashed (last line of error code was something like image 45.png in ../icons/liquid/ could not be loaded /doesn't exist or something like that. So I checkd it out and indeed, it doesn't exist (to temporarily fix this small problem I just did cp 44.png 45.png (which helped my problem, but isn't a nice 'long term' fix. I *would* like to hack up the desklet but the would require some python knowledge, but it doesn't look too hard :p. And I do not think that the desklet uses a 45.png image anyway... I just found it a bit odd. Thought I'd mention it.

Also, I've noticed that the days of the week don't seem to full fit in the width of the desklet (I'm sure the width can be changed?) anyways, the first 2 days are fine, but the last day.. eg Saterday gets cut off (I see half of the 'r').

That idea about putting the icons on a central server sounds all good and well in theory.. but I don't really like the idea too much. I'd much rather have control of the icons, I could also add my own (if I ever wanted too). And what would happen if you guys stop work on the desklet, the server goes down but other people want to keep on using the desklet, but can't because the icons can't be found (of course, one can hack up the code to fit his needs) but I hope you understand where I'm getting at. It's a nice idea, but it's *kind* of taking the *freedom* away from the end user?
Or have I totally misunderstood what was said? :D

By jeepston (Desklet Author), on Thu Apr 7 13:35:26 2005.

About the missing icons. I mentioned it in the README file. The only complete icon theme is from weather.com. If you have good painting skills you can create those missing pictures by yourself :lol:

What parts of the desklet you are displaying? Right now I have full desklet (Icon, current conditions and forecast) and everything is fitted into the window. (See my screenshot in the screenshots section).

Putting graphuc themes on the web is a better idea than to make the desklet package 10 Mb or bigger :) Currently we have three themes. But I hope in future people will contribute to this collection. I will provide the desklet with one of the themes (weather.com). And I don't see any difficulties for adding your own themes. Btw, if you have one and like it - feel free to share it with the world :)

By Ryanx0r (User), on Thu Apr 7 15:34:19 2005.

ok, well for some reason that width error kind of fixed it self... maybe it's some kind of thing that comes back at certain times.. when I see it again, I will take a screenshot.

About the icons being on the net. Do mean, the icon packs? Then you need to download the pack and add them yourself? Or that the desklet makes a connection to the server and just downloads the icon it needs for that moments weather condition? Cause I'm thinking I misread it.

By syfou (Core Developer & Desklet Author), on Thu Apr 7 15:38:11 2005.

Ryanx0r wrote:


That idea about putting the icons on a central server sounds all good and well in theory.. but I don't really like the idea too much. I'd much rather have control of the icons, I could also add my own (if I ever wanted too). And what would happen if you guys stop work on the desklet, the server goes down but other people want to keep on using the desklet, but can't because the icons can't be found (of course, one can hack up the code to fit his needs) but I hope you understand where I'm getting at. It's a nice idea, but it's *kind* of taking the *freedom* away from the end user?

A good implementation would provide a caching mechanism, so you could as well have the set locally in the first place by downloading it, or having pertinent icons locally in the long-run anyway: freedom would still be yours. And do not bother about this web space going away... Even if I want it to, I couldn't remove this site, by sourceforge policy. As long as I need to keep in open, I can as well let the icons on. Besides, this is GPLed code. Yo do not like this behavior, this is your freedom to change this... And that would not be a big task.

jeepston wrote:


The only complete icon theme is from weather.com

That's not entirely true... The "correct" icon set following the standard is about thirty icons, with a different mapping. They were introduced by UN-founded World Meteorological Organization, back in 1998... From 2000, they have a specialized service available online. At first, weather.com followed it, than extended it, than made it incompatible.

Anyway "incomplete" icon sets should just get some boundary control and assignation to default icons, that's all.

By syfou (Core Developer & Desklet Author), on Thu Apr 7 15:39:41 2005.

Ryanx0r wrote:


That idea about putting the icons on a central server sounds all good and well in theory.. but I don't really like the idea too much. I'd much rather have control of the icons, I could also add my own (if I ever wanted too). And what would happen if you guys stop work on the desklet, the server goes down but other people want to keep on using the desklet, but can't because the icons can't be found (of course, one can hack up the code to fit his needs) but I hope you understand where I'm getting at. It's a nice idea, but it's *kind* of taking the *freedom* away from the end user?

A good implementation would provide a caching mechanism, so you could as well have the set locally in the first place by downloading it, or having pertinent icons locally in the long-run anyway: freedom would still be yours. And do not bother about this web space going away... Even if I want it to, I couldn't remove this site, by sourceforge policy. As long as I need to keep in open, I can as well let the icons on. Besides, this is GPLed code. Yo do not like this behavior, this is your freedom to change this... And that would not be a big task.

jeepston wrote:


The only complete icon theme is from weather.com

That's not entirely true... The "correct" icon set following the standard is about thirty icons, with a different mapping. They were introduced by UN-founded World Meteorological Organization, back in 1998... From 2000, they have a specialized service available online. At first, weather.com followed it, than extended it, than made it incompatible.

Anyway "incomplete" icon sets should just get some boundary control and assignation to default icons, that's all. That is not a reason in my mind to priviledge an icon set over another if you prefer an other look, and that's why jeepston give you the choice.

By cRoMo (User), on Mon Apr 11 11:40:45 2005.

Does the big icon really has to be so big?? ;) I'd like to see proper option to set the "big icon's" size in config.txt :)

By Ryanx0r (User), on Mon Apr 11 13:14:07 2005.

Is it really *that* big? I find it a nice size :) I suppose you could hack it up to whatever you want!

By TomE (User), on Thu May 12 19:01:11 2005.

ive made a icon theme for this:

http://img211.echo.cx/img211/3622/handscreen0kj.png

you can download it here

tom :twisted:

By syfou (Core Developer & Desklet Author), on Thu May 12 19:34:32 2005: Wow.

That's orignal work by you? That's pretty nice, TomE! Your icon set is very good looking. :-)

Besides the icons, I do not recognise the font: what is it?

By jeepston (Desklet Author), on Fri May 13 11:17:05 2005.

Good work! Thanks for contributing :)

By TomE (User), on Fri May 13 12:17:56 2005: Re: Wow.

syfou wrote:

That's orignal work by you? That's pretty nice, TomE! Your icon set is very good looking. :-)

Besides the icons, I do not recognise the font: what is it?


yep all my work

fonts call rabiohead

By syfou (Core Developer & Desklet Author), on Fri May 13 13:11:32 2005: Re: Wow.

TomE wrote:



yep all my work

fonts call rabiohead


Thanks for the info. I posted an online repliqua of your font; just tell me if you want to add any copyright/copyleft information; it could be a good idea, so you get properly credited for your work.

By TimSchutte (Fearless Moderator), on Wed May 18 17:34:29 2005.

Hi Guys,

Well, I did a dumb thing and installed a new 120GB drive on the system and, naturally, fouled up the backup. I have managed to get things working again, but I am having trouble with weatherforecast-0.2.0. Here is the output:

tim@dojo weatherforecast-0.2.0 $ Traceback (most recent call last):
File "./weatherforecast.py", line 332, in ?
Events(dirname(__file__)).pause()
File "./weatherforecast.py", line 97, in __init__
adesklets.Events_handler.__init__(self)
File "usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 159, in __init__
File "usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 296, in _alarm
File "./weatherforecast.py", line 143, in alarm
self._display()
File "./weatherforecast.py", line 198, in _display
image=adesklets.load_image("%s/icons/%s/%s.png" % (self.basedir, self.theme, icon))
File "/usr/lib/python2.3/commands.py", line 646, in load_image

File "usr/lib/python2.3/site-packages/adesklets/commands_handler.py", line 103, in out
adesklets.error_handler.ADESKLETSError: adesklets command error - could not load image './icons/um/34.png' - no loader for file format

What do I need--that I had before but don't have now, to get it working?

Thanks,
Tim

By syfou (Core Developer & Desklet Author), on Wed May 18 17:49:14 2005.

Most probably, you did not compile imlib2 with png support (provided by libpng). Just make sure you installed libpng, then reinstall imlib2: support for png will be explicitely stated at the end of the configuration phase. Regards,

By TimSchutte (Fearless Moderator), on Thu May 19 04:41:51 2005: imlibs.

Hi Sylvain:

Quote:

Most probably, you did not compile imlib2 with png support (provided by libpng). Just make sure you installed libpng, then reinstall imlib2: support for png will be explicitely stated at the end of the configuration phase.


I rebuilt imlib2 from source--not RPM--and loaded the libpng--again from source and not RPM--and I am still getting the same message when I try to run ./weatherforecast.py. :cry:

Quote:

Here is the relevant lines from the config.log:
PNGLIBS='-lpng -lz -lm'
PNG_LOADER_FALSE='#'
PNG_LOADER_TRUE=''

Not sure what I am looking at, since I am not a programmer.

Little tip--if you want to build software from source, avoid the Mandrake/Mandriva distros. They omit any sort of development tools by default.

I can email you the entire config.log if you like.

Thanks,
Tim

By syfou (Core Developer & Desklet Author), on Thu May 19 13:11:36 2005.

Hi Tim,

Code:


PNGLIBS='-lpng -lz -lm'
PNG_LOADER_FALSE='#'
PNG_LOADER_TRUE='' 



this looks fine (although I do not have the PNG_LOADER symbol defined in mine, but BUILD_PNG_LOADER instead: did you install something up to date?), but I am pretty sure my diagnostic is correct, since I cross-checked my code and there is no other way you can get this specific error but by getting it from Imlib2, in the case it cannot load the file for the explicitely stated reason. You may try it by hand, from weatherforecast base directory:

Code:


echo load_image icons/um/34.png | adesklets :


And you should get this same error. Another slight possibility would be that the image file was corrupted, but this is doutbful. If my assertion is correct, you should also experience the same error with every desklet using PNGs. This makes we wonder: we experienced problems in the past because you had multiple versions of libraries lying around... Does this seems correct (i.e. is the date corresponding to your latest installation from source?), in bash?

Code:


ls -Llh $(ldd $(which adesklets) | gawk '/Imlib2/ {print $3}')

By xorBit (User), on Thu May 26 03:53:13 2005.

Just one thing: Does all adesklets weather provides europeans temperatures?

I live in paris and can't config weatherforecast and the weather desklets toget local temperature.

There's no location code for the europeans countries....

Any suggest??
Thanks

By syfou (Core Developer & Desklet Author), on Thu May 26 04:16:14 2005.

xorBit wrote:


There's no location code for the europeans countries....

Paris is FRXX0076.

By snader (User), on Thu May 26 07:20:02 2005.

You can get the code from the URL when you're on the appropriate page for the desired city.

For Groningen, Netherlands for example the URL is:
http://www.weather.com/outlook/travel/businesstraveler/local/NLXX0009?from=search_city

So the code is the bold-text sequence. HTH. :)

By Ibex (User), on Sun Jun 12 11:55:26 2005.

I think I've found a bug.
Sometimes, weatherinformation is not availible for a city. This is just temporary; after a few hours there is information available again. But I've seen that weatherforecast cannot handle such a temporary "stop" in information, so it simply crashes.

Code:

File "./weatherforecast.py", line 143, in alarm
    self._display()
  File "./weatherforecast.py", line 206, in _display
    location=str(self.w.loc.dnam).split(',')[0]
  File "/someplace/weather/xmltramp.py", line 113, in __getattr__
    raise AttributeError, 'No child element named \''+n+"'"
AttributeError: No child element named 'loc'



It's quite hard to explain it due of my bad knowledge of the english language, but I've taken some screenshot's of the site:

A city with normal information available:
http://users.pandora.be/ibex/info.jpg

A city with no/less information available (causes a crash):
http://users.pandora.be/ibex/noinfo.jpg

Maybe an idea to save the information in a simple file. So, when no valid information is gathered from the site, weatherforecast can show the information saved in the file instead of crash (or show N/A or something like that)

By syfou (Core Developer & Desklet Author), on Sun Jun 12 14:35:32 2005.

I submitted a new data parser a while back that handled this nicely...I guess we either have to convince jeepston to use it, or do the work ourselves: it is FOSS code. :-)

By exilejedi (Core Developer & Desklet Author), on Wed Jun 15 11:33:58 2005: Launch radar map in browser.

Here's a little diff to weatherforecast.py that I made this morning; it will load the weather.com radar map for your location in your browser. It makes my life slightly more convenient, so I figured I should share with y'all... And maybe it'd be a feature worth adding into the main package at some point.

Code:

76c76,77
<                     'bg':False}
---
>                     'bg':False,
>                     'browser_command':'firefox -remote "openURL(%s,new-tab)"'}
135a137,138
>         adesklets.menu_add_item('Map')
>         adesklets.menu_add_separator()
152a156,162
>         elif item=='Map':
>             self._launch_radar_map()
> 
>     def _launch_radar_map(self):
>         strURL = 'http://www.weather.com/weather/map/%s' % \
>                 self.config['location']
>         system((self.config['browser_command'] % strURL)+' &')

By whatever (User), on Fri Jun 24 08:47:54 2005.

Ibex wrote:

I think I've found a bug.
....

Code:

File "./weatherforecast.py", line 143, in alarm
    self._display()
  File "./weatherforecast.py", line 206, in _display
    location=str(self.w.loc.dnam).split(',')[0]
  File "/someplace/weather/xmltramp.py", line 113, in __getattr__
    raise AttributeError, 'No child element named \''+n+"'"
AttributeError: No child element named 'loc'



I am getting similar error:

Code:

Traceback (most recent call last):
  File "./weatherforecast.py", line 332, in ?
    Events(dirname(__file__)).pause()
  File "/usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 228, in pause
    posix_signal.pause()
  File "/usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 188, in _fire_event
    self._alarm()
  File "/usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 296, in _alarm
    timeout=self.alarm()
  File "./weatherforecast.py", line 143, in alarm
    self._display()
  File "./weatherforecast.py", line 206, in _display
    location=str(self.w.loc.dnam).split(',')[0]
  File "/home/whatever/.adesklets.d/weatherforecast-0.2.0/xmltramp.py", line 113, in __getattr__
    raise AttributeError, 'No child element named \''+n+"'"
AttributeError: No child element named 'loc'



This started a few days ago, after I upgraded to Python-2.3.5
Doesn't happen before, it crashes quite often now.

By Noobuntu (User), on Wed Jun 29 07:25:21 2005: 45.png missing in liquid theme.

Hi,

45.png (moon with rain) is missing in the "liquid" theme. You must have forgotten to import it (from the iWeather gdesklet or wherever).
I will post it here soon (as soon as I can fetch it from the iWeather desklet of gdesklets, but the page is, as usual, down).

By thinhla (User), on Sat Jul 9 21:59:51 2005.

I am not sure whether I should post my problem/concern about weatherforecast here. But anyway here it goes. Similar to first original post, instead of overlapping text I got the forecast section (3-day forecast) pushed out of the desklet window thus preventing one last forecast day not showing up/truncated when current sky conditon is too long (for instance: Partly cloudly with thunder strom.....)

I see in the code there's a section where we can define how wide a desklet window can be but not really sure what's what. How do we fix this?

By fallen (User), on Sun Aug 14 07:32:32 2005: sorry for bothering everyone.

but when i try to start weatherforecast.py
i got the error message below

Code:


[fallen@localhost /usr/share/adesklets/weatherforecast-0.2.0]$ ./weatherforecast.py
Traceback (most recent call last):
  File "./weatherforecast.py", line 332, in ?
    Events(dirname(__file__)).pause()
  File "./weatherforecast.py", line 97, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 159, in __init__
    self._alarm()
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 296, in _alarm
    timeout=self.alarm()
  File "./weatherforecast.py", line 143, in alarm
    self._display()
  File "./weatherforecast.py", line 198, in _display
    image=adesklets.load_image("%s/icons/%s/%s.png" % (self.basedir, self.theme, icon))
  File "/usr/lib/python2.4/site-packages/adesklets/commands.py", line 646, in load_image
    return comm.out()
  File "/usr/lib/python2.4/site-packages/adesklets/commands_handler.py", line 103, in out
    raise ADESKLETSError(4,message)
adesklets.error_handler.ADESKLETSError: adesklets command error - could not load image './icons/weather.com/-.png' - file does not exist


i don't know why...it should not load something like "-.png",right?
any help will be appreciated...thanks

By syfou (Core Developer & Desklet Author), on Sun Aug 14 15:15:32 2005.

I am not the author of this desklet, but it sure looks like a transcient error with the data source on weather.com that get mishandled for some unspecified reason, leading to trying to load an invalid -.png icon -- it is hard to debug, since no one knows the input that lead the desklet to that state. If ever it happens again, just call immediatly, from a console:

Code:


wget -O data.xml 'http://xoap.weather.com/weather/local/LOCATION?cc=*&dayf=3&unit=SYSTEM'


And post here the content of the data.xml file -- of course, replace LOCATION with the corresponding city location code you configured the desklet with, and the SYSTEM suffix with the letter 'm' for metric, or 's' for imperial, depending on what you choosed for the desklet... Yours,

By fallen (User), on Mon Aug 15 06:06:29 2005: thanks a lot.

thanks u...maybe just like you said.....it's ok now
i will try to get the "data.xml" when this issue happen next time.

By darkliquid (Desklet Author), on Mon Aug 15 08:17:42 2005.

Where this is:

Code:


# Draw the weather icon
           if self.show_icon and self.connection:
             try:
              icon=str(self.w['cc']['icon'])
             except (KeyError, ValueError, TypeError):
              icon='na'



I just added this as a quick hack to stop it dying every now and again:

Code:


             if (icon=="-"):
              icon='na'

By fallen (User), on Thu Aug 18 03:42:27 2005: same error comes again.

this time i grab the "data.xml" from weather.com
does it helps for solve the problem? i don't know where i can atttach these files.
i think i have to post it here...

Code:


<?xml version="1.0" encoding="ISO-8859-1"?>
<!--This document is intended only for use by authorized licensees of The Weather Channel. Unauthorized use is prohibited. Copyright 1995-2005, The Weather Channel Enterprises, Inc. All Rights Reserved.-->
<weather ver="2.0">
  <head>
    <locale>en_US</locale>
    <form>MEDIUM</form>
    <ut>C</ut>
    <ud>km</ud>
    <us>km/h</us>
    <up>mb</up>
    <ur>mm</ur>
  </head>
  <loc id="CHXX0116">
    <dnam>Shanghai, China</dnam>
    <tm>3:38 PM</tm>
    <lat>31.17</lat>
    <lon>121.43</lon>
    <sunr>5:22 AM</sunr>
    <suns>6:34 PM</suns>
    <zone>8</zone>
  </loc>
  <cc>
    <lsup>8/18/05 5:26 PM Local Time</lsup>
    <obst>N/A</obst>
    <tmp>N/A</tmp>
    <flik>N/A</flik>
    <t>N/A</t>
    <icon>-</icon>
    <bar>
      <r>N/A</r>
      <d>N/A</d>
    </bar>
    <wind>
      <s>N/A</s>
      <gust>N/A</gust>
      <d>N/A</d>
      <t>N/A</t>
    </wind>
    <hmid>N/A</hmid>
    <vis>N/A</vis>
    <uv>
      <i>N/A</i>
      <t>N/A</t>
    </uv>
    <dewp>N/A</dewp>
    <moon>
      <icon>13</icon>
      <t>Waxing Gibbous</t>
    </moon>
  </cc>
  <dayf>
    <lsup>8/18/05 1:17 PM Local Time</lsup>
    <day d="0" t="Thursday" dt="Aug 18">
      <hi>32</hi>
      <low>25</low>
      <sunr>5:22 AM</sunr>
      <suns>6:34 PM</suns>
      <part p="d">
        <icon>4</icon>
        <t>T-Storms</t>
        <wind>
          <s>6</s>
          <gust>N/A</gust>
          <d>7</d>
          <t>N</t>
        </wind>
        <bt>T-Storms</bt>
        <ppcp>90</ppcp>
        <hmid>71</hmid>
      </part>
      <part p="n">
        <icon>4</icon>
        <t>T-Storms</t>
        <wind>
          <s>11</s>
          <gust>N/A</gust>
          <d>352</d>
          <t>N</t>
        </wind>
        <bt>T-Storms</bt>
        <ppcp>90</ppcp>
        <hmid>87</hmid>
      </part>
    </day>
    <day d="1" t="Friday" dt="Aug 19">
      <hi>29</hi>
      <low>24</low>
      <sunr>5:23 AM</sunr>
      <suns>6:33 PM</suns>
      <part p="d">
        <icon>4</icon>
        <t>T-Storms</t>
        <wind>
          <s>14</s>
          <gust>N/A</gust>
          <d>358</d>
          <t>N</t>
        </wind>
        <bt>T-Storms</bt>
        <ppcp>80</ppcp>
        <hmid>73</hmid>
      </part>
      <part p="n">
        <icon>47</icon>
        <t>T-Storms Early</t>
        <wind>
          <s>13</s>
          <gust>N/A</gust>
          <d>3</d>
          <t>N</t>
        </wind>
        <bt>T-Storms</bt>
        <ppcp>60</ppcp>
        <hmid>80</hmid>
      </part>
    </day>
    <day d="2" t="Saturday" dt="Aug 20">
      <hi>31</hi>
      <low>22</low>
      <sunr>5:23 AM</sunr>
      <suns>6:32 PM</suns>
      <part p="d">
        <icon>30</icon>
        <t>Partly Cloudy</t>
        <wind>
          <s>11</s>
          <gust>N/A</gust>
          <d>5</d>
          <t>N</t>
        </wind>
        <bt>P Cloudy</bt>
        <ppcp>20</ppcp>
        <hmid>66</hmid>
      </part>
      <part p="n">
        <icon>29</icon>
        <t>Partly Cloudy</t>
        <wind>
          <s>6</s>
          <gust>N/A</gust>
          <d>353</d>
          <t>N</t>
        </wind>
        <bt>P Cloudy</bt>
        <ppcp>20</ppcp>
        <hmid>75</hmid>
      </part>
    </day>
  </dayf>
</weather>



hope this helps

By eNTi (User), on Tue Sep 20 10:55:12 2005.

i do have a problem: i've installed this neat adesklet and after a while, the data "went missing". i can't see my current weather conditions and the forecast for tomorrow all of a sudden says N/A. i can still get the _full_ forecast from www.weather.com. what's happening?

using: adesklets-0.4.12 + weatherforecast-0.2.0.

update: after a night full of sleep and a reboot, i got my forecast for tomorrow back to normal but still not current conditions.

By eNTi (User), on Wed Sep 21 09:59:45 2005.

are there plans to make the information source changeable? i like www.accuweather.com better. it provides a better forecast for europe it seems and maybe a switch to another source would resolve the current weather conditions "bug", that i seem to have.

By ezekiel_quacks (User), on Thu Sep 29 14:54:17 2005: truncated desklet display.

Thanks for a useful and attractive desklet! Beyond wishing for a little more configurability, I find it just as I would like.

However, I just encountered what appears to be a small and infrequently occurring bug: when the current weather condition string is too long, it seems to push the forecast information to the right far enough that the last day's forecast is truncated -- it's just a wee bit too wide overall to fit in the offscreen buffer image.

The specific case I see is that the current weather condition string is set to "Mostly Cloudy and Windy" and my three forecast days are Thursday, Friday and Saturday. Both location_font_size and small_font_size are set to 10; if I change the latter to 8, then everything fits. Alternatively, if I change the offscreen image width to 525 in the source code, then everything shows with font size 10.

By Borromini (User), on Fri Dec 9 14:31:00 2005.

I recently reinstalled my Zenwalk (updated to latest version). I find weatherforecast not working anymore...

It just flickers (as many did before...). Then I get the following error message:

stijn[weatherforecast-0.2.0]$ python weatherforecast.py
Do you want to (r)egister this desklet or to (t)est it? t
Now testing...
============================================================
If you do not see anything (or just an initial flicker
in the top left corner of your screen), try `--help',
and see the FAQ: `info adesklets'.
============================================================
Traceback (most recent call last):
File "weatherforecast.py", line 332, in ?
Events(dirname(__file__)).pause()
File "weatherforecast.py", line 97, in __init__
adesklets.Events_handler.__init__(self)
File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 158, in __init__
self._alarm()
File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 296, in _alarm
timeout=self.alarm()
File "weatherforecast.py", line 143, in alarm
self._display()
File "weatherforecast.py", line 198, in _display
image=adesklets.load_image("%s/icons/%s/%s.png" % (self.basedir, self.theme, icon))
File "/usr/lib/python2.4/site-packages/adesklets/commands.py", line 646, in load_image
return comm.out()
File "/usr/lib/python2.4/site-packages/adesklets/commands_handler.py", line 103, in out
raise ADESKLETSError(4,message)
adesklets.error_handler.ADESKLETSError: adesklets command error - could not load image './icons/weather.com/-.png' - file does not exist

I don't get it (I don't know python).

Could anybody help me out? I run the latest adesklets, 0.4.12, and weatherforecast 0.2.0 on kernel 2.6.14.2 and imlib2 1.2.1. adesklets is called with $ adesklets --xfce4.

By Robin Pfeifer (User), on Fri Dec 30 12:35:47 2005.

I've just switched to Gentoo and emerged adesklets 0.4.10 (the current version in stable portage). I've got problems with the weatherforecast and weather desklets: they won't connect to the internet at all. When I start them from a terminal window there is no output; after minutes the text 'No internet connection' appears with weatherforecast, and an empty image of weather appears with 'N/A' in it. The mailer desklet is perfectly able to get an internet connection, and of course browsers etc. are, too. Can anyone give me any pointers where the error might be hidden?

I am using a router with integrated firewall, but I used to do so before I switched to Gentoo, too - no settings have been changed; and under my previous SuSE installation weatherforecast and weather worked perfectly.

Robin

By syfou (Core Developer & Desklet Author), on Wed Jan 18 12:09:29 2006.

For cognoscentii: related post on the gentoo forums.

By syfou (Core Developer & Desklet Author), on Wed Jan 18 12:18:54 2006.

Borromini wrote:


I don't get it (I don't know python).

Could anybody help me out? I run the latest adesklets, 0.4.12, and weatherforecast 0.2.0 on kernel 2.6.14.2 and imlib2 1.2.1. adesklets is
called with $ adesklets --xfce4.


Most likely a transcient problem with the feed. Weatherforecast is not shielded against these; I guess I should swing a patch to Dmitry... You can try emailing him about it. Yours,

By Robin Pfeifer (User), on Fri Jan 20 04:58:30 2006.

The post on the gentoo forum is mine, too... ;) For reasons I can't figure my old bitpicker login here doesn't work anymore, my password isn't accepted and neither is the e-mail address I have used during registration.

Robin

By drphibes (User), on Sun Feb 12 19:48:40 2006.

how can i narrow the right edge so i can move it over a little further to the right edge of the screen. maybe 30 more pixels or so.

By Walt H (User), on Sun Feb 26 02:33:33 2006: problem at overlapping fonts.

I have a problem with the weatherforecast desklet that I haven't quite seen described here.

Sometimes, like when I'm surfing the web or running some other application, when I go back to check the weather, I see instances of fonts on top of one another, and it isn't because text extends from one section into another.

Here's an example of what I mean:

[URL=http://img130.imageshack.us/my.php?image=weather9li.jpg]http://img130.imageshack.us/img130/6779/weather9li.th.jpg[/URL]


I have a similar problem with the Calendar desklet, where certain letters/number seem to be displayed on top of one another. Since these problems seem similar, they are outlined here in the same post. Any thoughts on how to remedy this? Thanks.

By syfou (Core Developer & Desklet Author), on Sun Feb 26 15:18:46 2006.

Walt H wrote:


Sometimes, like when I'm surfing the web or running some other application, when I go back to check the weather, I see instances of fonts on top of one another, and it isn't because text extends from one section into another.

Is it possible you use adesklets along an older (< 1.2.x) or non-vanilla (third-party patched) release of Imlib2? I have seen this kind of bugs on Mandriva a couple of times in the past that were solved by upgrading. This could also explains the other problem you are experiencing. A potential fix would be to upgrade from source to a fresh version of Imlib2 (to avoid problems, do not forget to uninstall the one you already have), then to the latest official release of adesklets (0.5.0 at the time of writing).

By Walt H (User), on Sun Feb 26 21:30:06 2006.

I'm using the latest version of adesklets as built texstar for PCLinuxOS. The version of imlib is 1.9.14-8.1tex, again built by texstar for PCLinuxOS. I don't know how heavily it's patched or if it's patched. (I also don't see imlib2. Okay, I looked again and see that it is 1.1.0-4tex, so that could well be the problem.)

I'm not really well versed or very comfortable with building from source, so I'll have to think about that. If I go that route, do I also have to uninstall adesklets and reinstall it?

By syfou (Core Developer & Desklet Author), on Mon Feb 27 00:59:03 2006.

Walt H wrote:

I'm using the latest version of adesklets as built texstar for PCLinuxOS. The version of imlib is 1.9.14-8.1tex, again built by texstar for PCLinuxOS. I don't know how heavily it's patched or if it's patched. (I also don't see imlib2. Okay, I looked again and see that it is 1.1.0-4tex, so that could well be the problem.)

In that case, it is not even a matter of having a patched Imlib2 or not: your Imlib2 library does not meet the minimum requirements for adesklets (Imlib2 1.1.2), and it re-enforces my feeling that this is the root of all evil ;-). In fact, adesklets refuses to proceed with anything older when compiled from source, which means your package maintainer himself had no choice but to use a newer version (by the way, I suggest you drop him a mail or a bug report about it if you have a chance, since this looks like a packaging mistake).

WaltH wrote:


I'm not really well versed or very comfortable with building from source, so I'll have to think about that. If I go that route, do I also have to uninstall adesklets and reinstall it?

That's the beauty of dynamic libraries: no, you don't (well... At least as long as the problem lies in Imlib2). But:

This said, Imlib2 1.1.0 is almost three years old: I am sure you can find a more recent prepackaged version than that -- even Debian has Imlib2 1.2.0 in its stable branch these days!

By Walt H (User), on Tue Feb 28 00:02:45 2006: imlib2 problem solved - but font questions remain.

I upgraded imlib2, but I still have a few font issues with the weatherforecast desklet. I find that in certain conditions (short, one-word weather conditions like rain), the F for Farenheit at the end of the Feels Like temperature runs into the sunrise time for day one of the three-day forecast. Is there a way to put some space between the current conditions and the start of that forecast?

Second, I don't see anyway to change the font size of the forecast. The location font size and small font size both appear to only affect the current conditions. Unless there's some setting I don't understand or don't know about.

Finally, can the font be changed as in other desklets? If so, do I need to edit the actual script itself to do that? Thanks.

By Walt H (User), on Sat Mar 4 11:31:29 2006: how to change font and font size.

What fonts can weatherforecast use, and how can I change them? The configuration file allows only changing the size of the location and current conditions font sizes. Can other settings be added to that configuration file, and if so, how?

I am primarily looking for ways to avoid the overlapping text problems that have plagued several of us with this desklet. It doesn't happen all the time, just with certain weather conditions. I would also like to use the same font size for everything. Thanks.

By Walt H (User), on Sun Mar 5 02:09:11 2006: managed to figure it out.

I'm not sure I can explain it, but with some experimentation, I managed to change the font and some of the spacing in the script. At the same time, I also managed to change the font sizes so that the location and the days are in one font size and the current conditions and forecast are in a different size. Now, to play some more and try to create a semi-transparent look like I was finally able to achieve with the calendar desklet.

By Walt H (User), on Mon Mar 6 21:45:34 2006.

In a different section, Noobuntu asked:

Noobuntu wrote:

Ok, I did change the entries in weatherforecast.py and now it displays my fonts. I use FreeSansBold. However, it cuts the bottom part, so one cannot see the bottom of the g's or p's or any letter that extends down. Fixes?


My answer, after some hacking around in the weatherforecast.py file, was:

Walt H wrote:

One thing you can try is to change the size of the background image in weatherforecast.

First, back up your copy of weatherforecast.py. Then, open weatherforecast.py with a text editor and look for a line like this (in my file, it's line 118):

Code:


self.buffer=adesklets.create_image(500,120)


The first value sets the width, the second sets the height. Try increasing that second value. You will also need to change the value in the line that reads

Code:

        
adesklets.window_resize(self.window_w,120)

(in my file, line 133)
Make that value the same. If you changed the first 120 to 150, increase this 120 to 150 as well.

There's one more place you have to change. It's the line (in my file, line 162) that reads

Code:

        
adesklets.image_fill_rectangle(0,0,self.window_w,120)


This number should be the same as the other two; in my example, it's now 150. Save your file and restart the desklet. I think that will take care of the problem.


I have since found that you can change the width as well, if necessary. If you go back to the line that reads (line 118 in my file)

Code:

self.buffer=adesklets.create_image(500,120)

and change the first value from 500 to, say, 520, and also go to the line that reads

Code:

self.show_forecast: self.window_w=520

(line 132 in my file) and change that value of 500 to the new value, then restart the desklet, you can widen it as well as increase the height.

I have found this useful for eliminating the problems of overlapping text. I hope it helps someone else.

By ZiOns (User), on Thu May 18 05:33:11 2006.

hello

I got this little bug this morning :
http://frodo1.free.fr/Images/weather.png

The sky conditions are so long that the last forecast is cut.

Edit : adesklets-0.5.0 under ubuntu 6.06 dapper Beta - weatherforcast-0.2.0

By Stemp (User), on Thu Jun 8 13:29:58 2006.

hello

On Dapper using adesklets 0.5.0-2 and WeatherForecast 0.2.0 I still have problems with the fonts :(

http://ubuntufr.free.fr/upload/weatherforecast.png

By elims (User), on Sat Jun 17 04:20:19 2006.

Hi all,

first, this weatherplugin is really awsome. This evening i hacked the code a little bit, because i wasn't satisfied with the design and the function of the applet. First i went to http://liquidweather.net/icons.html where one could find a really nice selection of icons for the superKaramba plugin for KDE. Just copy them in the right folder for your desklet. Then i hacked the phyton file to get some more usefull informations out of the xml-file.
Now it looks like this:
http://www.foruni.de/board/images/user_fotos/2582_2252.png
i added the following features:
-location, day and current condition are now VeraBd.
-the current wheater section shows now real temperature, feels like temperature, wind and its direction, humidity, visibility, uv-rate and daytimes.
-a lable which shows the last update from weather.com (under the big icon) with own color and a switch in the config.txt.
-3 different font sizes. big for the location, medium for th current condition, the days and the temperature forecast. as well as a small size for the rest.
-in the forecast all the "N/A"-tags have a own color.
-the forecast now shows a short tag, wind and wind direction and the temperature.
- the forecast icons are bigger and i streched the size to 775 in width which should be enougth for long weather descriptions.
- a lot of new bugs. not very stable yet and widely untested.

unfortunatley today was the first time i worked with phyton. and i don't have a clue how to debug it. i'll try to make it more stable. it seems that the beginning of a new day will brake it.

Is there a way to upload my version of the code so that others can have a look at it?

Maybe the author is also interessted in incorporate some of the lines in a further version of this awsome weatherplugin.

cheers

By Oliazk (User), on Fri Nov 10 00:03:19 2006.

I was wondering if it would be possible to modify it so it would take information from the noaa weather site instead of weather.com?

By jake3988 (User), on Wed Jan 10 17:30:41 2007.

Traceback (most recent call last):
File "./weatherforecast.py", line 332, in ?
Events(dirname(__file__)).pause()
File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 228, in pause
posix_signal.pause()
KeyboardInterrupt



I get that on startup. Any clue? Thanks a bunch!


And zions, if you're still hanging around these parts... what's that theme you have where you got it/how to install it. That looks freaking sweet.

By syfou (Core Developer & Desklet Author), on Wed Jan 10 19:44:47 2007.

jake3988 wrote:

Traceback (most recent call last):
KeyboardInterrupt

I means the desklet script received a SIGQUIT (usually via ^C, hence the KeyboadInterrupt name); I have no idea why though... Anything out of the ordinary about your system?

By jake3988 (User), on Thu Jan 11 14:09:23 2007.

I figured it out. I didn't have the python-gtk set installed and then it still didn't work. Then I tried adesklets --nautilus and it popped right up.

The theme I think, is um. Whee. Got everything I needed to know.

By syfou (Core Developer & Desklet Author), on Thu Jan 11 19:36:20 2007.

Just for the record, adesklets has nothing to do with python-gtk: It does not use it in any way.


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.