cant add a city

Asked by Yhd4711499 on 2013-01-10

Version: 12.07.30-0ubuntu1
Language: Chinese

I have tried adding these cities : london, beijing, chengdu, newyork. All failed.
File "usr/bin/indicator-weather", line 1892 in on_apply(location_code, location_details) = self.location.export_location_details()
File "usr/bin/indicator-weather", line 405, in export_location_details return (self.location_code, self.location_details)
AttributeError:Location instance has no attribute 'location_code;]

Question information

English Edit question
Weather Indicator Edit question
No assignee Edit question
Last query:
Last reply:
Yhd4711499 (yhd4711499) said : #1

os is Ubuntu 12.10

davide (linuxdavide) said : #2

Do you select "Google" from Source Weather Data in Preferences? If yes, try "Yahoo" because I had the similar problem.

Seán Ó Séaghdha (seanos) said : #3

Same problem on Oneiric 11.10.

Makes no difference at all whether I choose Yahoo or Google.

Makes no difference what location I try (e.g. London, Paris, New York).

The Apply button does nothing but produce the error:

Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1882, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 405, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

I did manage to add a location using the gsettings example at but Baton Rouge weather isn't too useful for me.

I suppose I might be able to find the appropriate gsettings command to make this work, but wouldn't it be better if the app just worked?

Joshua Tasker (jtasker) said : #4

Yahoo shut down their public/free PlaceFinder service and that's what broke the app.

They suggest using their public/free YQL service instead, so I rewrote the add location part to use YQL instead of PlaceFinder.

You can get an updated package from my PPA here:

Hope that helps

Can you help with this problem?

Provide an answer of your own, or ask Yhd4711499 for more information if necessary.

To post a message you must log in.