Page 369 of 380 FirstFirst ... 269319359367368369370371379 ... LastLast
Results 3,681 to 3,690 of 3796

Thread: Conky Weather Forecast Python Script

  1. #3681
    Join Date
    Apr 2010
    Beans
    14

    Unhappy Re: Conky Weather Forecast Python Script

    My conkyforecastWU script has started to produce strange errors. A closer examination revealed that the script no longer accepts larger daynumber values than 3. Terminal output looks like this:

    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1812, in <module>
    main()
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1809, in main
    forecastinfo.writeOutput()
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1415, in writeOutput
    output = self.getOutputFromTemplate(template)
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1398, in getOutputFromTemplate
    output += self.getTemplateItemOutput(template[b + 1 : a])
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1355, in getTemplateItemOutput
    return self.getDatasetOutput(datatype, startday, endday, night, shortweekday, imperial, beaufort, metrespersecond, hideunits, hidedegreesymbol, spaces, minuteshide, centeredwidth)
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1251, in getDatasetOutput
    output += self.getDatatypeFromSet(datatype, self.forecast_data[self.options.location].day[daynumber], shortweekday, imperial, beaufort, metrespersecond, tempunit, speedunit, distanceunit, pressureunit, minuteshide, centeredwidth)
    IndexError: list index out of range


    The .conkyForecastWu.config file is set to MAXIMUM_DAYS_FORECAST = 7 (both in ~/ and /usr/share/..).

    The script has worked perfectly til about a week ago. Any enlightened and skilful suggestions to how I can get the nice forecast working (beyond day 3) again is greatly appreciated.

  2. #3682
    Join Date
    Aug 2011
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by petvet2 View Post
    My conkyforecastWU script has started to produce strange errors. A closer examination revealed that the script no longer accepts larger daynumber values than 3. Terminal output looks like this:

    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1812, in <module>
    main()
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1809, in main
    forecastinfo.writeOutput()
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1415, in writeOutput
    output = self.getOutputFromTemplate(template)
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1398, in getOutputFromTemplate
    output += self.getTemplateItemOutput(template[b + 1 : a])
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1355, in getTemplateItemOutput
    return self.getDatasetOutput(datatype, startday, endday, night, shortweekday, imperial, beaufort, metrespersecond, hideunits, hidedegreesymbol, spaces, minuteshide, centeredwidth)
    File "/usr/share/conkyforecast/conkyForecastWU.py", line 1251, in getDatasetOutput
    output += self.getDatatypeFromSet(datatype, self.forecast_data[self.options.location].day[daynumber], shortweekday, imperial, beaufort, metrespersecond, tempunit, speedunit, distanceunit, pressureunit, minuteshide, centeredwidth)
    IndexError: list index out of range


    The .conkyForecastWu.config file is set to MAXIMUM_DAYS_FORECAST = 7 (both in ~/ and /usr/share/..).

    The script has worked perfectly til about a week ago. Any enlightened and skilful suggestions to how I can get the nice forecast working (beyond day 3) again is greatly appreciated.
    Bob63 had the same problem yesterday with my weather script and we were able to solve it.
    I think that WU fixed a bug where forecast was returning a 7 day forecast when it was supposed to return a 4 day forecast yesterday.
    Try this fix and see if it works for you.
    In your conkyForecastWU.config file change line 5 from
    Code:
    BASE_WU_JSON_URL = http://api.wunderground.com/api/<WU_STRATUS_LICENCE_KEY>/geolookup/conditions/forecast/alerts/astronomy/lang:<LANGCODE>/q/<LOCATION>.json
    to
    Code:
    BASE_WU_JSON_URL = http://api.wunderground.com/api/<WU_STRATUS_LICENCE_KEY>/geolookup/conditions/forecast7day/alerts/astronomy/lang:<LANGCODE>/q/<LOCATION>.json
    This will use "forecast7day" select a 7 day forecast (including today) instead of the 4 day forecast (including today) that "forecast" now returns.

    Using "forecast7day" should produce the same results as before but may not work with a Stratus API key.
    Let us know if this works or not.
    Last edited by arclance; February 18th, 2012 at 09:33 PM.
    Building Conky | iCalendar Conky | Weather Script | Background List
    Intel Core i7-2600K - 3.40GHz | Asus P8Z68-V LE | 8GB RAM - 1866 MHz | Nvidia GeForce GTX 560 Ti

  3. #3683
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by arclance View Post
    Yes you are wrong but you really have to look at the json to know that, I only know because I just looked at it.
    Oh Darn! First time in like ... checking watch ... 23 minutes.

    OK, do I shoot myself or go have a coffee.
    I'm used to a different system. Sorry.

    Oh, I'm going for the coffee, the other option is a bit rash!

  4. #3684
    Join Date
    Apr 2010
    Beans
    14

    Wink Re: Conky Weather Forecast Python Script

    Quote Originally Posted by arclance View Post
    Bob63 had the same problem yesterday with my weather script and we were able to solve it.
    I think that WU fixed a bug where forecast was returning a 7 day forecast when it was supposed to return a 4 day forecast yesterday.
    Try this fix and see if it works for you.
    In your conkyForecastWU.config file change line 5 from
    Code:
    BASE_WU_JSON_URL = http://api.wunderground.com/api/<WU_STRATUS_LICENCE_KEY>/geolookup/conditions/forecast/alerts/astronomy/lang:<LANGCODE>/q/<LOCATION>.json
    to
    Code:
    BASE_WU_JSON_URL = http://api.wunderground.com/api/<WU_STRATUS_LICENCE_KEY>/geolookup/conditions/forecast7day/alerts/astronomy/lang:<LANGCODE>/q/<LOCATION>.json
    This will use "forecast7day" select a 7 day forecast (including today) instead of the 4 day forecast (including today) that "forecast" now returns.

    Using "forecast7day" should produce the same results as before but may not work with a Stratus API key.
    Let us know if this works or not.
    Excellent advise! Everything is working as it should - Many thanks arclane!
    I have to add that a system reboot was required to flush out the 'bad' values (perhaps logout would do the same - but better safe than sorry).

  5. #3685
    Join Date
    Jun 2007
    Beans
    2

    Re: Conky Weather Forecast Python Script

    Warning this post is from a newbie coder so please don't laugh
    ....


    I have been using kaivalagi's forecast script for quite some time and since moving over to conkyForecastWU i have missed the use of local icons (from what i can see it does not have this feature yet) and i have seen people using lua and stuff to draw icons which seems a little excessive to me (everyone has their own way of doing things)

    Anyway to cut to the point i have written a little bash script that queries conkyForecastWU and matches the output to an image here is the code (its still a work in progress not all possible outputs are their just yet)

    Code:
    #!/bin/bash
    #Forecast query script by blitz http://blitz-bomb.deviantart.com/
    
    script=$(conkyForecastWU --datatype=CT); #conkyForecast query 
    ImageSize="155x100" #Image size
    ImagePos="0,-10" #Image position
    
    if [ "$script" == "Haze" ]; 
    then
      echo "\${image ~/.conky/weather-icons/20.png -p $ImagePos -s $ImageSize}"
    elif [[ "$script" == *"Fog"* ]]; 
    then
      echo "\${image ~/.conky/weather-icons/22.png -p $ImagePos -s $ImageSize}"
    elif [[ "$script" == *"Mist"* ]]; 
    then
      echo "\${image ~/.conky/weather-icons/21.png -p $ImagePos -s $ImageSize}"
    elif [[ "$script" == *"Spray"* ]]; 
    then
      echo "\${image ~/.conky/weather-icons/9.png -p $ImagePos -s $ImageSize}"
    elif [[ "$script" == *"Rain"* ]]; 
    then
      echo "\${image ~/.conky/weather-icons/12.png -p $ImagePos -s $ImageSize}"  
    elif [[ "$script" == *"Drizzle"* ]]; 
    then
      echo "\${image ~/.conky/weather-icons/11.png -p $ImagePos -s $ImageSize}"
    elif [[ "$script" == *"Snow"* ]]; 
    then
      echo "\${image ~/.conky/weather-icons/14.png -p $ImagePos -s $ImageSize}"              
    elif [ "$script" == "Clear" ]; 
    then
      echo "\${image ~/.conky/weather-icons/32.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Partly Cloudy" ]; 
    then
      echo "\${image ~/.conky/weather-icons/30.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Mostly Cloudy" ]; 
    then
      echo "\${image ~/.conky/weather-icons/28.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Scattered Clouds" ]; 
    then
      echo "\${image ~/.conky/weather-icons/28.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Overcast" ]; 
    then
      echo "\${image ~/.conky/weather-icons/26.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Heavy Haze" ]; 
    then
      echo "\${image ~/.conky/weather-icons/22.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Heavy Spray" ]; 
    then
      echo "\${image ~/.conky/weather-icons/9.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Heavy Snow" ]; 
    then
      echo "\${image ~/.conky/weather-icons/7.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Heavy Rain" ]; 
    then
      echo "\${image ~/.conky/weather-icons/12.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Heavy Drizzle" ]; 
    then
      echo "\${image ~/.conky/weather-icons/10.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Light Spray" ]; 
    then
      echo "\${image ~/.conky/weather-icons/8.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Light Haze" ]; 
    then
      echo "\${image ~/.conky/weather-icons/20.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Light Fog" ]; 
    then
      echo "\${image ~/.conky/weather-icons/20.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Light Mist" ]; 
    then
      echo "\${image ~/.conky/weather-icons/20.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Light Rain" ]; 
    then
      echo "\${image ~/.conky/weather-icons/8.png -p $ImagePos -s $ImageSize}"                                          
    elif [ "$script" == "Light Drizzle" ]; 
    then
      echo "\${image ~/.conky/weather-icons/8.png -p $ImagePos -s $ImageSize}"      
    elif [ "$script" == "Light Snow" ]; 
    then
      echo "\${image ~/.conky/weather-icons/6.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Snow Showers" ]; 
    then
      echo "\${image ~/.conky/weather-icons/7.png -p $ImagePos -s $ImageSize}"
    elif [ "$script" == "Rain Showers" ]; 
    then
      echo "\${image ~/.conky/weather-icons/10.png -p $ImagePos -s $ImageSize}"
    
    fi
    The output of this looks something like this

    (at the moment i have 3 of these scripts but im going to make it so you only have to use one)

    I thought i would post this to show a newbies thought process to get to this and maybe someone will find this useful and i will continue to update if someone does i dont know anything about python or i would have just added it to the original script i only know bash

    You can get the icons i used here (found them somewhere on the net i think they are the ones included with rainmeter)
    http://db.tt/NtCryJOM
    Last edited by deco147; March 2nd, 2012 at 10:09 PM.

  6. #3686
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    @deco147, looks nice

    BTW You can use images with conkyForecastWU,in the same way as the previous script, with the --datatype=WI option inside an conky image tag within a template file. There are 9 icons to choice from too, they are set by the ICON_SET option in the config with values "a" to "i". I just haven't put support in for weather condition fonts...

    Those icons are nice though!

  7. #3687
    Join Date
    Mar 2012
    Beans
    6

    Re: Conky Weather Forecast Python Script

    Last week I installed conky and it was working fine until a couple of days ago when ConkyForecast stopped working.
    The XML feed opens fine in my web browser, but when running conkyForecast I get the following error:

    ERROR: Error reading weather data: Data element <lsup> not present under <cc>
    ERROR: Location ARSA0079 is not in cache.
    ERROR: Failed to load the location cache
    ERROR: Location ARSA0079 is not in cache.
    ERROR: Failed to load the location cache

    Any idea what could be causing this?
    Thanks in advance,

  8. #3688
    Join Date
    Aug 2011
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by deco147 View Post
    You can get the icons i used here (found them somewhere on the net i think they are the ones included with rainmeter)
    http://db.tt/NtCryJOM
    The original source of those icons is here.
    They are the VClouds Weather Icons by VClouds, made for his Rainmeter weather skin.

    I wrote this to use them in my weather script using the icon names returned by 'icon' instead of the condition/forecast text for now since only the current conditions seem to use the full list of possible conditions.
    PHP Code:
    rainmeter_imageSelectIcon_Day={
        
    "chanceflurries":"18"# Snow Flurries ###
        
    "chancerain":"10"# Light Rain ###
        
    "chancesleet":"6"# Sleet ###
        
    "chancesnow":"14"# Snow ###
        
    "chancetstorms":"17"# Thunderstorms ###
        
    "clear":"32"# Clear - day ####
        
    "cloudy":"26"# Cloudy ###
        
    "flurries":"18"# Snow Flurries ###
        
    "fog":"20"# Fog ###
        
    "hazy":"21"# Haze ###
        
    "mostlycloudy":"28"# Mostly Cloudy - day ###
        
    "mostlysunny":"34"# Partly Cloudy - day  ###
        
    "partlycloudy":"30"# Partly Cloudy - day ###
        
    "partlysunny":"28"# Mostly Cloudy - day  ###
        
    "sleet":"6"# Sleet ###
        
    "rain":"39"# Rain ###
        
    "snow":"41"# Snow ###
        
    "sunny":"32"# Hot ###
        
    "tstorms":"37"# Thunderstorms ###
        
    "unknown":"44" # N/A ###
    }

    rainmeter_imageSelectIcon_Night={
        
    "chanceflurries":"18"# Snow Flurries ###
        
    "chancerain":"10"# Light Rain ###
        
    "chancesleet":"6"# Sleet ###
        
    "chancesnow":"14"# Snow ###
        
    "chancetstorms":"17"# Thunderstorms ###
        
    "clear":"31"# Clear - day ####
        
    "cloudy":"26"# Cloudy ###
        
    "flurries":"18"# Snow Flurries ###
        
    "fog":"20"# Fog ###
        
    "hazy":"21"# Haze ###
        
    "mostlycloudy":"27"# Mostly Cloudy - day ###
        
    "mostlysunny":"33"# Partly Cloudy - day  ###
        
    "partlycloudy":"29"# Partly Cloudy - day ###
        
    "partlysunny":"27"# Mostly Cloudy - day  ###
        
    "sleet":"6"# Sleet ###
        
    "rain":"45"# Rain ###
        
    "snow":"46"# Snow ###
        
    "sunny":"31"# Hot ###
        
    "tstorms":"47"# Thunderstorms ###
        
    "unknown":"44" # N/A ###
    }

    def selectForecastIcon_Rainmeter(iconString,isNight):
        if 
    isNight == True:
            
    imageNumber rainmeter_imageSelectIcon_Night[iconString]
        else:
            
    imageNumber rainmeter_imageSelectIcon_Day[iconString]
        
    #endif
        
    return (imageNumber)
    #enddef 
    Since I really like these icons I made the function below to work from the condition text which allows for a little more variety.
    PHP Code:
    def selectForecastIconCurrent_Rainmeter(iconString,isNight):  # not finished yet
        
    if iconString.find("Drizzle") != (-1):
            
    imageNumber "11"
        
    elif iconString.find("Rain") != (-1):
            if 
    isNight == True:
                
    imageNumber "45"
            
    else:
                
    imageNumber "39"
            
    #endif
        
    elif iconString.find("Snow") != (-1):
            if 
    isNight == True:
                
    imageNumber "46"
            
    else:
                
    imageNumber "41"
            
    #endif
        
    elif iconString.find("Snow Grains") != (-1):
            
    imageNumber "18"
        
    elif iconString.find("Ice Crystals") != (-1):
            
    imageNumber "18"
        
    elif iconString.find("Ice Pellets") != (-1):
            
    imageNumber "6"
        
    elif iconString.find("Hail") != (-1):
            
    imageNumber "6"
        
    elif iconString.find("Mist") != (-1):
            
    imageNumber "20"
        
    elif iconString.find("Fog") != (-1):
            
    imageNumber "20"
        
    elif iconString.find("Smoke") != (-1):
            
    imageNumber "22"
        
    elif iconString.find("Volcanic Ash") != (-1):
            
    imageNumber "22"
        
    elif iconString.find("Widespread Dust") != (-1):
            
    imageNumber "19"
        
    elif iconString.find("Sand") != (-1):
            
    imageNumber "21"
        
    elif iconString.find("Haze") != (-1):
            
    imageNumber "19"
        
    elif iconString.find("Spray") != (-1):
            
    imageNumber "9"
        
    elif iconString.find("Dust Whirls") != (-1):
            
    imageNumber "19"
        
    elif iconString.find("Sandstorm") != (-1):
            
    imageNumber "21"
        
    elif iconString.find("Low Drifting Snow") != (-1):
            
    imageNumber "15"
        
    elif iconString.find("Low Drifting Widespread Dust") != (-1):
            
    imageNumber "19"
        
    elif iconString.find("Low Drifting Sand") != (-1):
            
    imageNumber "21"
        
    elif iconString.find("Blowing Snow") != (-1):
            
    imageNumber "15"
        
    elif iconString.find("Blowing Widespread Dust") != (-1):
            
    imageNumber "19"
        
    elif iconString.find("Blowing Sand") != (-1):
            
    imageNumber "21"
        
    elif iconString.find("Rain Mist") != (-1):
            
    imageNumber "9"
        
    elif iconString.find("Rain Showers") != (-1):
            if 
    isNight == True:
                
    imageNumber "45"
            
    else:
                
    imageNumber "39"
            
    #endif
        
    elif iconString.find("Snow Showers") != (-1):
            if 
    isNight == True:
                
    imageNumber "46"
            
    else:
                
    imageNumber "41"
            
    #endif
        
    elif iconString.find("Ice Pellet Showers") != (-1):
            
    imageNumber "6"
        
    elif iconString.find("Small Hail Showers") != (-1):
            
    imageNumber "6"
        
    elif iconString.find("Hail Showers") != (-1):
            
    imageNumber "6"
        
    elif iconString.find("Thunderstorms and Rain") != (-1):
            if 
    isNight == True:
                
    imageNumber "47"
            
    else:
                
    imageNumber "38"
            
    #endif
        
    elif iconString.find("Thunderstorms and Snow") != (-1):
            if 
    isNight == True:
                
    imageNumber "47"
            
    else:
                
    imageNumber "38"
            
    #endif
        
    elif iconString.find("Thunderstorms and Ice Pellets") != (-1):
            if 
    isNight == True:
                
    imageNumber "47"
            
    else:
                
    imageNumber "38"
            
    #endif
        
    elif iconString.find("Thunderstorms with Hail") != (-1):
            if 
    isNight == True:
                
    imageNumber "47"
            
    else:
                
    imageNumber "38"
            
    #endif
        
    elif iconString.find("Thunderstorms with Small Hail") != (-1):
            if 
    isNight == True:
                
    imageNumber "47"
            
    else:
                
    imageNumber "38"
            
    #endif
        
    elif iconString.find("Thunderstorm") != (-1):
            if 
    isNight == True:
                
    imageNumber "47"
            
    else:
                
    imageNumber "38"
            
    #endif
        
    elif iconString.find("Freezing Drizzle") != (-1):
            
    imageNumber "5"
        
    elif iconString.find("Freezing Rain") != (-1):
            
    imageNumber "5"
        
    elif iconString.find("Freezing Fog") != (-1):
            
    imageNumber "20"
        
    elif iconString.find("Overcast") != (-1):
            
    imageNumber "26"
        
    elif iconString.find("Clear") != (-1):
            if 
    isNight == True:
                
    imageNumber "31"
            
    else:
                
    imageNumber "32"
            
    #endif
        
    elif iconString.find("Partly Cloudy") != (-1):
            if 
    isNight == True:
                
    imageNumber "29"
            
    else:
                
    imageNumber "30"
            
    #endif
        
    elif iconString.find("Mostly Cloudy") != (-1):
            if 
    isNight == True:
                
    imageNumber "27"
            
    else:
                
    imageNumber "28"
            
    #endif
        
    elif iconString.find("Scattered Clouds") != (-1):
            if 
    isNight == True:
                
    imageNumber "33"
            
    else:
                
    imageNumber "34"
            
    #endif
        
    else:
            
    imageNumber "44"
        
    #endif
        
    return imageNumber
    #enddef 
    Here is what it looks like in action.


    Last edited by arclance; March 17th, 2012 at 03:56 AM.
    Building Conky | iCalendar Conky | Weather Script | Background List
    Intel Core i7-2600K - 3.40GHz | Asus P8Z68-V LE | 8GB RAM - 1866 MHz | Nvidia GeForce GTX 560 Ti

  9. #3689
    Join Date
    Mar 2012
    Beans
    6

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by AngelGris View Post
    Last week I installed conky and it was working fine until a couple of days ago when ConkyForecast stopped working.
    The XML feed opens fine in my web browser, but when running conkyForecast I get the following error:

    ERROR: Error reading weather data: Data element <lsup> not present under <cc>
    ERROR: Location ARSA0079 is not in cache.
    ERROR: Failed to load the location cache
    ERROR: Location ARSA0079 is not in cache.
    ERROR: Failed to load the location cache

    Any idea what could be causing this?
    Thanks in advance,
    Also tried conkyForecastWU with the following configuration
    Code:
    #=============================================#
    # EXPERT SETTINGS, NOT REQUIRED TO BE ALTERED #
    #=============================================#
    BASE_WU_JSON_URL = http://api.wunderground.com/api/<WU_STRATUS_LICENCE_KEY>/geolookup/conditions/forecast/q/<LOCATION>.json
    BASE_WU_ICON_URL = http://icons.wxug.com/i/c/<ICON_SET>/<ICON>.gif
    MAXIMUM_DAYS_FORECAST = 7
    
    #===============================================#
    # USER SETTINGS, EDIT BASED ON DOCUMENTED SETUP #
    #===============================================#
    CACHE_FOLDERPATH = /tmp/
    ICON_SET = a
    CONNECTION_TIMEOUT = 5
    EXPIRY_MINUTES = 30
    TIME_FORMAT = %H:%M
    DATE_FORMAT = %d/%m/%Y
    LOCALE = es
    WU_STRATUS_LICENCE_KEY = XXXXXXXXXXX
    WU_CUMULUS_LICENCE_KEY =
    WU_ANVIL_LICENCE_KEY =
    DEFAULT_LOCATION = AR/Salta 
    AUTO_NIGHT = False
    PROXY_HOST = 
    PROXY_PORT = 8080
    PROXY_USERNAME = 
    PROXY_PASSWORD =
    But I get this error
    Code:
    ERROR: Error reading weather data: 'alerts'
    ERROR: Location AR/Salta is not in cache.
    ERROR: Failed to load the location cache for AR/Salta
    ERROR: Location AR/Salta is not in cache.
    ERROR: Failed to load the location cache
    Any ideas, please?

  10. #3690
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by AngelGris View Post
    Also tried conkyForecastWU with the following configuration
    ...
    But I get this error
    Code:
    ERROR: Error reading weather data: 'alerts'
    ERROR: Location AR/Salta is not in cache.
    ERROR: Failed to load the location cache for AR/Salta
    ERROR: Location AR/Salta is not in cache.
    ERROR: Failed to load the location cache
    Any ideas, please?
    If I run the following:

    Code:
    conkyForecastWU --location=AR/Salta --verbose
    I get 26C

    What version of the script are you running?
    I am running v2.24 (run conkyForecastWU --version for find out)

    Here's my ~/.conkyForecast.config file:
    Code:
    #=============================================#
    # EXPERT SETTINGS, NOT REQUIRED TO BE ALTERED #
    #=============================================#
    BASE_WU_JSON_URL = http://api.wunderground.com/api/<WU_STRATUS_LICENCE_KEY>/geolookup/conditions/forecast/alerts/astronomy/lang:<LANGCODE>/q/<LOCATION>.json
    BASE_WU_ICON_URL = http://icons.wxug.com/i/c/<ICON_SET>/<ICON>.gif
    MAXIMUM_DAYS_FORECAST = 7
    
    #===============================================#
    # USER SETTINGS, EDIT BASED ON DOCUMENTED SETUP #
    #===============================================#
    CACHE_FOLDERPATH = ~/.scripts/conky/cache/
    PERSISTED_CACHE_FOLDERPATH = ~/.scripts/conky/cache/
    ICON_SET = i
    CONNECTION_TIMEOUT = 5
    EXPIRY_MINUTES = 30
    TIME_FORMAT = %H:%M
    DATE_FORMAT = %Y-%m-%d
    LOCALE = en
    WU_STRATUS_LICENCE_KEY = REGISTERFORTHIS
    WU_CUMULUS_LICENCE_KEY = REGISTERFORTHIS
    WU_ANVIL_LICENCE_KEY = REGISTERFORTHIS
    DEFAULT_LOCATION = UK/Norwich 
    AUTO_NIGHT = False
    PROXY_HOST = 
    PROXY_PORT = 8080
    PROXY_USERNAME = 
    PROXY_PASSWORD =

Page 369 of 380 FirstFirst ... 269319359367368369370371379 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •