MWI won't launch on Ubuntu 12.04 after newest updates

Asked by apollo

MWI won't run anymore on Ubuntu 12.04, either from the Dash or the terminal.
Could you take a look at this?

Thanks in advance.

<gettext.GNUTranslations instance at 0xb4acc38c>
No LSB modules are available.
#####################################################
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
Version: i686
#####################################################

My-Weather-Indicator version: 0.6.0.7.precise.1
#####################################################
('/home/apollo/.config/my-weather-indicator/my-weather-indicator.conf', True)
{"rawOffset":0,"dstOffset":0,"gmtOffset":0,"lng":0,"lat":0}
Timezone Error 'sunrise'
Searching url: http://where.yahooapis.com/geocode?q=0.0,+0.0&gflags=R&flags=J&appid=_slN0oHV34Exg09kl5EASmbGBs5y3GJES1N.Oon0wd5Lnh6E5hGdtQmx_MdxpOxKAzftS1dB0yNI_NzTpWaKFXEm
Yahoo Weather Service, not found woeid
Traceback (most recent call last):
  File "/usr/bin/my-weather-indicator", line 45, in <module>
    mwi=MWI()
  File "/usr/share/my-weather-indicator/myweatherindicator.py", line 135, in __init__
    self.load_preferences()
  File "/usr/share/my-weather-indicator/myweatherindicator.py", line 343, in load_preferences
    self.work()
  File "/usr/share/my-weather-indicator/myweatherindicator.py", line 195, in work
    self.set_menu()
  File "/usr/share/my-weather-indicator/myweatherindicator.py", line 438, in set_menu
    temporal_current_conditions = weather['current_conditions']
TypeError: 'NoneType' object has no attribute '__getitem__'

Question information

Language:
English Edit question
Status:
Solved
For:
my-weather-indicator Edit question
Assignee:
No assignee Edit question
Solved by:
apollo
Solved:
Last query:
Last reply:
Revision history for this message
wangyan (253914333-g) said :
#1

You provide a wrong latitude and a wrong longitude.The program can not found your location ,city,coutry etc. All the information is blanck .So the MWI won't display. Maybe you have a wrong config file.Try to delete the ~/.config/my-weather-indicator/my-weather-indicator.conf,after that to restart your program.

Revision history for this message
apollo (mr2rebel) said :
#2

Hello wangyan and thank you for your prompt response.
This absolutely did the trick.
No idea how I got to to this point, though, since it was working before.
Anyhow, thanks again :-)

Revision history for this message
wangyan (253914333-g) said :
#3

When the program first starts or it doesn,t have config file, it will present the preference interface to get your location.The programe must have a way to get your location automaticly because when i first start the program the location is ok( just name is not coincident) ,i guess the program gets your location from your ip adress . The weather service world weater online can get your locations information from your IP,such as city ,country,latitude, longitude an so on.