I get "Unknown error occurred while picking up weather data" when trying to open forecast.

Bug #776586 reported by Christian Dysthe
186
This bug affects 39 people
Affects Status Importance Assigned to Milestone
Weather Indicator
Fix Released
High
Vadim Rutkovsky

Bug Description

 I get "Unknown error occurred while picking up weather data" when trying to open forecast. I'm running 11.05.01 'Cloudy 6' on Ubuntu Natty x64

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: indicator-weather 11.05.01~natty2
ProcVersionSignature: Ubuntu 2.6.38-9.43-generic 2.6.38.4
Uname: Linux 2.6.38-9-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
CrashDB: indicator_weather
Date: Tue May 3 12:27:51 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110302)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: indicator-weather
ThirdParty: True
UpgradeStatus: Upgraded to natty on 2011-04-30 (2 days ago)

Revision history for this message
Christian Dysthe (christian-dysthe) wrote :
Revision history for this message
Panagiotis Skintzos (ph7) wrote :

Yes. that was a regression. A fix has been committed in revision 258

Changed in weather-indicator:
status: New → Confirmed
status: Confirmed → Fix Committed
importance: Undecided → High
Revision history for this message
Mostafa (mostafa-sedaghat) wrote :

I had same problem. I deleted location, and added it again, it solved!

Revision history for this message
Olivia (oli-maia) wrote :

Same here -- deleting and re-adding location didn't do any good.

Revision history for this message
Panagiotis Skintzos (ph7) wrote :

@Olivia: Please upgrade to the PPA version and try again (clear the locations first):
https://launchpad.net/~weather-indicator-team/+archive/ppa

Revision history for this message
Olivia (oli-maia) wrote :

That's the version I've been using from the start. No luck. Already cleared locations twice, just to be sure.

If it makes any difference, my location is "São Paulo capital, São Paulo, Brasil" (maybe the ã character is causing this?)

Revision history for this message
Olivia (oli-maia) wrote :

Buena: I changed location to Rio de Janeiro (no special characters), and still got the same error.

Revision history for this message
Panagiotis Skintzos (ph7) wrote : Re: [Bug 776586] Re: I get "Unknown error occurred while picking up weather data" when trying to open forecast.

Please attach the log file (~/.cache/indicator-weather.log)

Revision history for this message
Olivia (oli-maia) wrote :

Launchpad seems to hate me right now, but I put the log file in my Dropbox account:
http://dl.dropbox.com/u/1808872/indicator-weather.log

Revision history for this message
Panagiotis Skintzos (ph7) wrote :

@Olivia: Have you tried again? I get correct results every time for Sao Paulo and Rio. The coordinates used seem right.
The forecast info comes always from Google (even when Yahoo is used as main source), because it provides more days of forecast info. Sometimes though, the reports from Google are empty/invalid and this can happen with the normal weather report as well.

Revision history for this message
Olivia (oli-maia) wrote :

Nope, still nothing.

In that case, it might be something wrong with getting info from Google. I changed the data provider to Google and left it as that. After a while, this is what I got after clicking "update" (atualizar) and waiting a bit:

http://img90.imageshack.us/img90/7629/dellscreenshot038.png

I'm not sure if it did update or not, considering the weather's still just as boring as it has been for most of the day, but it still says last update was a whole bunch of "minutes ago".

In the log file:

[MainThread] 2011-05-09 20:11:13,150 - DEBUG - Indicator: updateWeather: updating weather for ['455827', 'S\xc3\xa3o Paulo']
[Cache] 2011-05-09 20:11:13,151 - DEBUG - Setting: getting cached weather for 455827
[Fetcher] 2011-05-09 20:11:13,152 - DEBUG - Indicator: getWeather for location 'São Paulo capital, São Paulo, Brasil'
[Fetcher] 2011-05-09 20:11:13,152 - DEBUG - Indicator: getWeather: updating weather report
[Fetcher] 2011-05-09 20:11:13,152 - DEBUG - Location: default weather source 'Google' chosen for 'São Paulo'
[Cache] 2011-05-09 20:11:13,157 - DEBUG - Indicator: loading weather from cache for ['455827', 'S\xc3\xa3o Paulo']
[Cache] 2011-05-09 20:11:13,157 - DEBUG - Indicator: menu_normal: filling in a menu for found places
[Cache] 2011-05-09 20:11:13,174 - DEBUG - Indicator: update_label: setting label to ' '
[Cache] 2011-05-09 20:11:13,180 - DEBUG - Indicator: setting refresh label to 'Atualizando, aguarde'
[Cache] 2011-05-09 20:11:13,186 - DEBUG - Indicator: update_label: setting label to '19 ˚C'
[Fetcher] 2011-05-09 20:11:14,270 - DEBUG - Weather: current condition: 'cloudy', '('weather-clouds', 'weather-clouds-night', False)'
[Fetcher] 2011-05-09 20:11:30,646 - DEBUG - Weather: got localtime 2011-05-09 20:11:26, dst 0, sunrise '06:30:48', sunset '17:34:17', night = True
[Fetcher] 2011-05-09 20:11:30,648 - DEBUG - Indicator: updateWeather: waiting for 'Cacher' thread to terminate
[Fetcher] 2011-05-09 20:11:30,648 - DEBUG - Indicator: updateWeather: got condition 'Nublado', icon 'weather-clouds'
[Fetcher] 2011-05-09 20:11:30,648 - ERROR - 'condition'
[Fetcher] 2011-05-09 20:11:30,649 - DEBUG - Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1280, in get_new_weather_data
    self.condition = weather.get_condition_label()
  File "/usr/bin/indicator-weather", line 671, in get_condition_label
    condition = self.__localized_report['current_conditions']['condition']
KeyError: 'condition'

[Fetcher] 2011-05-09 20:11:30,649 - DEBUG - Indicator: scheduling update in 15 mins

Changed in weather-indicator:
milestone: none → 11.05.15
Changed in weather-indicator:
status: Fix Committed → Confirmed
Revision history for this message
chris (christopherpetit) wrote :

ProblemType: Bug
DistroRelease: Ubuntu 10.10
kernel 2.6.35.28.36
Architecture: intel x86 32
indicator_weather
LANGUAGE=en_US:en

NOT WORKING ON 10.10 ALSO weather indicator 11.05.01 cloudy 6

tried to delete area/city and add again no affect still tells weather on panel but no extended forecast

all software was updated not too long ago was on 11.04 but seemed kinda buggy with some of my programs and there are still more packages avail to 10.10 may upgrade later seems like it worked before the massive uppgrade almost all programs all system files were updated kernel etc 450 mb updates

Revision history for this message
Gtmoraes1 (gtmoraes1) wrote :

Same issue, but with Recife, Pernambuco.
I'm not even getting information, it's blank where was supposed to be the info.

I've tried removing my town (and adding another city, because I can't click OK without a city), reinstalling indicator-weather and then adding my place. No luck.

Revision history for this message
Donmatas (elcorreodematias) wrote :

same issue, Washington DC, USA

Revision history for this message
Alfred (alfred-egger) wrote :

Same problem here, I attached a log file.

Revision history for this message
fralk (fmonte) wrote :

I had the same issue but I fixed it by deleting the couchDB as explained here:

https://bugs.launchpad.net/weather-indicator/+bug/769842/comments/2

and then reconfiguring again

Revision history for this message
Olivia (oli-maia) wrote :

fralk, that didn't do me any good.

Except now I can't find "São Paulo, São Paulo" in the list; the closest thing to it is "O Paulo, São Paulo". I hope it's only a code problem because of the "ã", otherwise the indicator just became useless :(

(I mean, temperature seems about right. I'll check with my netbook just to be sure.)

Revision history for this message
plopp (jirihusak) wrote :

with the current version in Unstable PPA, no items in the applet menu work (excluding preferences, which work);
downgrade to to stable PPA version (cloudy6) makes menuitems work again
google provider settings does not provide any icons for my location (Prague, Czech Republic), nor for the panel, nor for forecast;
yahoo provider settings shows icon in the panel, (google provider powered) forecast icons do not show either

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Yep, there is already a bug on this -
https://bugs.launchpad.net/bugs/788780

Changed in weather-indicator:
status: Confirmed → Fix Committed
Changed in weather-indicator:
assignee: nobody → Vadim Rutkovsky (roignac)
milestone: 11.05.30 → none
status: Fix Committed → Fix Released
Revision history for this message
Olivia (oli-maia) wrote :

Hey, I'm on 11.05.31 'Cloudy 8' now, and the problem persists. Same thing. Can't open forecast yet.

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

This might be fixed in 11.05.31_<your ubuntu version>4

Revision history for this message
Olivia (oli-maia) wrote :

I'm still getting this same error. Using the last version (11.05.31~natty6). Tried deleting location and adding it again, and still nothing.

:(

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Could you please attach a new log from ~/.cache/indicator-weather.log? Note, that this might be also caused by incorrect Google data - in this case we can do nothing about it.

Revision history for this message
Olivia (oli-maia) wrote :

It says something like "returned empty forecast", it seems.

Revision history for this message
Olivia (oli-maia) wrote :

You think this might be related to this bug in my-weather-indicator: https://bugs.launchpad.net/my-weather-indicator/+bug/790623 maybe? I installed that program and changing the language to 'English' was all it took for it to retrieve data from google. Considering it seems other people with this problem also have their system language set to something other than English, it could be something to look into.

Revision history for this message
Paulo Novais (valeptb) wrote :

Hi.
I also have version 11.05.31 'Cloudy 8' and the error persist also.

2011/6/6 Olivia <email address hidden>

> Hey, I'm on 11.05.31 'Cloudy 8' now, and the problem persists. Same
> thing. Can't open forecast yet.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/776586
>
> Title:
> I get "Unknown error occurred while picking up weather data" when
> trying to open forecast.
>
> Status in Indicator-Weather:
> Fix Released
>
> Bug description:
> I get "Unknown error occurred while picking up weather data" when
> trying to open forecast. I'm running 11.05.01 'Cloudy 6' on Ubuntu
> Natty x64
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: indicator-weather 11.05.01~natty2
> ProcVersionSignature: Ubuntu 2.6.38-9.43-generic 2.6.38.4
> Uname: Linux 2.6.38-9-generic x86_64
> NonfreeKernelModules: nvidia
> Architecture: amd64
> CrashDB: indicator_weather
> Date: Tue May 3 12:27:51 2011
> EcryptfsInUse: Yes
> InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110302)
> PackageArchitecture: all
> ProcEnviron:
> LANGUAGE=en_US:en
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> SourcePackage: indicator-weather
> ThirdParty: True
> UpgradeStatus: Upgraded to natty on 2011-04-30 (2 days ago)
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/weather-indicator/+bug/776586/+subscribe
>

--
*Cumprimentos/Regards*
*Valeptb*

Revision history for this message
Paulo Novais (valeptb) wrote :

Têm alguma previsão na resolução deste bug?
Gosto muito da aplicação, mas realmente a previsão é uma parte importante que nunca funcionou.
Obrigado

Revision history for this message
Dominik (dominalien) wrote :

This bug affects me as well. I'm on Oneiric, indicator-weather version 11.05.31 'Cloudy 8'. I'm trying to get forecast info for Warsaw ("Warszawa") in Poland. Log attached.

I tried changing the system language to English as someone suggested, but to no avail.

smoor (simormate)
description: updated
Revision history for this message
smoor (simormate) wrote :

Yep, the bug still lives in Oneiric. Version 11.05.31 'Cloudy 8'. My location is set to Nantes, France. Language is English.

If I choose Google as a source, it cannot even fetch the current weather, first it is 'refreshing', then gives up and shows the same state what I downloaded the last time before I switched to Google.

With Yahoo, current weather is shown, but no forecast.

Revision history for this message
FrenchNux (christophe-pauc) wrote :

Hi,

I am from Nantes too and i have same issue.

Revision history for this message
bilio (laun) wrote :

I managed to solve it, partially - could show it in English only.

To show the forecast, first you need ROOT permission to /usr/bin/
Than, close the weather indicator
Open /usr/bin/indicator-weather.py with the text editor (it's called gedit) and perform a search for the text "hl" (without the double quotation marks). You should make every "hl" search result into "hl = 'en'" (without the double quotation marks - you should keep the single ones around the word en).

Hope it helps!
And I really tried to explain it even to beginners.

P.S: Sorry about any grammar mistake.

Revision history for this message
Olivia (oli-maia) wrote :

bilio,
makes sense. see what i wrote in comment #25. there was a similar bug in another weather application (my-weather-indicator), and the way to solve it was to force the forecast language to english. thanks for the tip.

Revision history for this message
Olivia (oli-maia) wrote :

Just tested biblio's solution, and it worked. Of course the forecast is shown in English now.

Revision history for this message
Jbyvosges (j-lbarbry) wrote :

It's don't work for me.
I replaced every hl = self.locale or hl = local_name by hl ='en'

Example : self.forecast = pywapi.get_weather_from_google (location_name, hl = 'en')

Error is the same : Unknow error occured while picking up weather data

Revision history for this message
Lubo Tobias (lubo-tobias) wrote :

bilio,
can you explain, how to ROOT permission please?

Revision history for this message
GermanK (germank) wrote :

For me, the problem was that apparently, google couldn't resolve the location by it's latitude/longitude. I just hardcoded location_name to a "City, Country" like string and now it works. It's not a fix, it's just a workaround. To do the same thing, just add after line 471 a statement setting location_name = "Your location, Your Country".

Revision history for this message
Jbyvosges (j-lbarbry) wrote :

GermanK,

With added line,
Error is the same : Unknow error occured while picking up weather data

Revision history for this message
Luís de Sousa (luis-de-sousa) wrote :

Hello,

I'm having this same problem in two different systems: Ubutnu 11.04 and 11.10, both in English. The app version is Weather Indicator 11.05.31 'Cloudy 8'. Interestingly, there's no "hl" string in my indicator-weather.py.

Revision history for this message
Luís de Sousa (luis-de-sousa) wrote :

If the status of this bug is "fix released", what do I need to do to install this fix? Thanks.

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

My fault, packages are not yet build

Changed in weather-indicator:
status: Fix Released → Fix Committed
Revision history for this message
GermanK (germank) wrote :

Jbyvosges,
Sorry, that was only fixing it for Yahoo. The way to hardcode your location to work with Google (warning: this is just a hack!!) is replacing line 444 (which is the first parameter to the constructor of a Weather object) to a string "Location Name, Country Name". Now I have it working with Google, but not with Yahoo. Well, you can't have it all :P ... actually, you can, but it takes time. And since there is a fix already commited, I just hope it gets applied soon.

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Please update to 11.11.28 package from PPA

Changed in weather-indicator:
milestone: none → 11.11.27
status: Fix Committed → Fix Released
Revision history for this message
GermanK (germank) wrote :

It's still failing for me. I've uninstalled, reinstalled, and have the version 11.11.28.
@Jbyvosges,
I correct the previous comment I've made: the line I change is not the 444, but the 443. Either way, you can search for "self.location_details[loc_ids[valid_source]]".
Instead of that a string containing the location name, in the mentioned format, works for me.
@Vadim,
The query to Google is failing when the expression self.location_details[loc_ids[valid_source]] contains the value ",,,48671030,6150832". As I mentioned, changing that for the string name of the city, solves the problem for me.

Revision history for this message
Jbyvosges (j-lbarbry) wrote :

Installing 11.11.28 'Cloudy 9
Great news: the error message is now in French !
'Une erreur inconnue est survenue pendant la récupération des données météorlogiques'
It's the same witg Google or Yahoo

tail log file :
[MainThread] 2012-02-01 12:19:38,891 - DEBUG - Indicator: open Forecast
[MainThread] 2012-02-01 12:19:38,891 - DEBUG - ExtendedForecast: creating
[MainThread] 2012-02-01 12:19:38,894 - DEBUG - ExtendedForecast: finishing initialization
[MainThread] 2012-02-01 12:19:38,894 - DEBUG - ExtendedForecast: chosen place: Hergugney (code 594693)
[MainThread] 2012-02-01 12:19:38,894 - DEBUG - ExtendedForecast: getting forecast data
[MainThread] 2012-02-01 12:19:49,146 - ERROR - Forecast: returned empty forecast ,,,48383333,6200000
[MainThread] 2012-02-01 12:19:52,449 - DEBUG - ExtendedForecast: closing window

@GermanK (germank) : whad do you change excatlty ? give me a concrete example, please.

Revision history for this message
GermanK (germank) wrote :

I've changed this:

self.weather = Weather(
                self.location_details[loc_ids[valid_source]],
                valid_source, self.metric_system, self.wind_unit,
                self.location_details['latitude'],
                self.location_details['longitude'])

into this:

self.weather = Weather(
                'Villers-lès-Nancy, France',
                valid_source, self.metric_system, self.wind_unit,
                self.location_details['latitude'],
                self.location_details['longitude'])

Revision history for this message
Jbyvosges (j-lbarbry) wrote :

Sorry, GermanK (germank), but I got the same error message when I try 'Forecast' both with Google than Yahoo :

[MainThread] 2012-02-02 15:18:44,840 - DEBUG - Indicator: open Forecast
[MainThread] 2012-02-02 15:18:44,840 - DEBUG - ExtendedForecast: creating
[MainThread] 2012-02-02 15:18:44,843 - DEBUG - ExtendedForecast: finishing initialization
[MainThread] 2012-02-02 15:18:44,843 - DEBUG - ExtendedForecast: chosen place: Hergugney (code 594693)
[MainThread] 2012-02-02 15:18:44,844 - DEBUG - ExtendedForecast: getting forecast data
[MainThread] 2012-02-02 15:18:55,030 - ERROR - Forecast: returned empty forecast ,,,48387418,6202057
[MainThread] 2012-02-02 15:18:57,597 - DEBUG - ExtendedForecast: closing window

I tried with 'Hergugney, France' and (like in configuration) 'Hergugney, Lorraine, France'

PS. (Its the same with 'Villers-lès-Nancy, France', )

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Original error has been fixed (in Weather Indicator), other errors occur due to the fact that Google returns empty forecast. The only fail-proof solution is to move away from Google to something much more reliable.

BTW the team is still looking for a contributor.
I've asked Santa Claus to bring the new developer in the team, so we could push a new shiny version in Precise. It seems, that Santa has failed me once again =(

Revision history for this message
Manuel dos Santos (manuel-santos13) wrote :

Why if we use my-wheather-indicator it's ok ?

and with indicator-weather, it's impossible to have forecast ?

Revision history for this message
Vadim Rutkovsky (roignac) wrote :
Revision history for this message
marcb_ro (marcb-ro) wrote :

Possible workaround for forecast:

Open /usr/bin/indicator-weather.py as root and change according to your geographic position (around line #471)

try:
     # Generate a fake location by current coordinates
     location_name = ",,,%s,%s" % (self.lat, self.lon)
     self.forecast = pywapi.get_weather_from_google (location_name, hl = self.locale)

to

try:
     # Generate a fake location by current coordinates
     location_name = "YOUR_CITY,YOUR_COUNTRY"
     self.forecast = pywapi.get_weather_from_google (location_name, hl = self.locale)

Restart the weather indicator and enjoy the 4-day weather forecast from Google.

I know this comes against post #49, but it gets the job done for me. Thought I might as well share it with others.

Revision history for this message
Jbyvosges (j-lbarbry) wrote :

Yes, it works.
I put location_name ="city, region, country"

Thanks to you

Revision history for this message
Manuel dos Santos (manuel-santos13) wrote :

Perfect !!!

Thanks !

Revision history for this message
Jbyvosges (j-lbarbry) wrote :

I give up !
If the forecasts are now operating, it is the rest that does not work : I always get 11 ° C whatever the weather.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.