View Full Version : Trouble with conky weather.

June 9th, 2009, 02:46 PM
As the threads title states, i have trouble with my conky weather script.
A few days ago i formated my drive and re-installed Ubuntu. Tho i thought i had everything backed up, i forgot the weather script. Now, when i tried getting it back, i am expieriancing major difficulties. Basicly it was a nice weather script and showed me the current temperatures outside, the "Feels like" temperature, a forecast for tomorrow and wind speed.

I got my hands on a few other weather scripts but they all seem to have the same problem. It's not parsing the weather.xsit file and gives out this error report:

sm1g@homebox:~$ conky
Conky: desktop window (3f) is root window
Conky: window type - desktop
Conky: drawing to created window (0x2000001)
Conky: drawing to double buffer
-:1: parser error : Document is empty

-:1: parser error : Start tag expected, '<' not found

I/O error : Invalid seek
unable to parse -

As you can see, it's not parsing the damn file and says it's empty. It is not. Here are the files contents:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:output method="text" disable-output-escaping="yes"/>
<xsl:template match="weather">
<xsl:apply-templates select="cc"/>
<xsl:apply-templates select="dayf/day[@d='1']"/>

<xsl:template match="cc">
<xsl:text>Location: </xsl:text><xsl:value-of select="obst"/>
<xsl:text> Temperature: </xsl:text><xsl:value-of select="tmp"/><xsl:value-of select="/weather/head/ut"/>
<xsl:if test="tmp != flik">
Feels Like: </xsl:text><xsl:value-of select="flik"/><xsl:value-of select="/weather/head/ut"/>
Conditions: </xsl:text><xsl:value-of select="t"/>
Wind: </xsl:text>
<xsl:when test="wind/s = 'calm'"><xsl:text>0</xsl:text></xsl:when>
<xsl:otherwise><xsl:value-of select="wind/s"/></xsl:otherwise>
<xsl:value-of select="/weather/head/us"/>
<xsl:when test="wind/s = 'calm'"><xsl:text>(0mph)</xsl:text></xsl:when>
<xsl:otherwise><xsl:text> (</xsl:text><xsl:value-of select="round(wind/s * 0.6214)"/><xsl:text>mph)</xsl:text></xsl:otherwise>
<xsl:text> (</xsl:text><xsl:value-of select="wind/t"/>

<xsl:template match="dayf/day[@d='1']">
Tomorrow: </xsl:text><xsl:value-of select="low"/><xsl:value-of select="/weather/head/ut"/>
<xsl:text> to </xsl:text><xsl:value-of select="hi"/><xsl:value-of select="/weather/head/ut"/>
<xsl:text>, </xsl:text><xsl:value-of select="part[@p='d']/t"/>
</xsl:text><xsl:value-of select="/weather/swa/a/t"/>

If anyone knows where the problem is, i'll be happy to recieve help. Currently, im frustrated with this thing.


Nevermind, i just realised i didn't have CURL installed.
You can delete the thread or leave it for future reference in case someone else forgets aswell. :)