Saturday, July 02, 2016

My Weather Indicator Story

So, the other day I was looking for something here on OE10, and I've noticed some of the old screenshots, most of those had an applet to show the temperature around here. I really miss those... Is nice to go back and be able not only to see an old screenshot of a desktop from halcyon days, but also get to know the temperature at that moment.
Getting one up & working became a necessity!
After a bit of Googling and after adding it repository, installed "My Weather Indicator":

colossus > sudo apt-get install my-weather-indicator
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  account-plugin-windows-live empathy-common folks-common gnome-contacts
  gstreamer0.10-nice gstreamer0.10-plugins-good gstreamer0.10-x
  gstreamer1.0-nice guile-2.0-libs libavahi-gobject0 libfarstream-0.1-0
  libfarstream-0.2-2 libfolks-eds25 libfolks-telepathy25 libfolks25 libgc1c2
  libgupnp-igd-1.0-4 libhdb9-heimdal libkdc2-heimdal libmeanwhile1
  libmission-control-plugins0 libnice10 libntdb1 libpurple-bin libpurple0
  libtelepathy-farstream3 libtelepathy-logger3 libupstart1 libzephyr4
  linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic
  linux-image-3.16.0-30-generic linux-image-extra-3.16.0-30-generic
  python-ntdb signon-plugin-password telepathy-gabble telepathy-haze
  telepathy-logger telepathy-mission-control-5 telepathy-salut
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  geoclue-hostip gir1.2-geocodeglib-1.0 gir1.2-json-1.0 libgeocode-glib0
  python3-dateutil python3-requests-oauthlib python3-tz
The following NEW packages will be installed:
  geoclue-hostip gir1.2-geocodeglib-1.0 gir1.2-json-1.0 libgeocode-glib0
  my-weather-indicator python3-dateutil python3-requests-oauthlib python3-tz
0 upgraded, 8 newly installed, 0 to remove and 14 not upgraded.
Need to get 4,269 kB of archives.
After this operation, 17.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]


Ok, so, 17 MB... What a hell!! But...
Anyway, installed it, and then problems started for good.



It crashed upon starting it a couple of times, not the best way of starting things...
In the end, it did started, but didn't update any weather at all, so changed the source of weather info to Weather Underground, and restarted the program... well restarted is just a saying... After that My Weather Indicator refused to start at all.
Digging a bit, I found this:

colossus > ./my-weather-indicator
(my-weather-indicator:12951): Gtk-WARNING **: Theme parsing error: unity.css:29:40: Missing opening bracket in color definition

#####################################################
System: Linux
Machine: x86_64
Node: colossus
Release: 3.16.0-76-generic
Version: #98~14.04.1-Ubuntu SMP Fri Jun 24 17:04:54 UTC 2016
Platform: Linux-3.16.0-76-generic-x86_64-with-Ubuntu-14.04-trusty
My-Weather-Indicator version: 0.8.1-0extras16.04.1
#####################################################

****** Requesting timezone identificacion
1
***** refreshing weather *****
--- Updating data in location 0 ---
****** Updating weather
****** Calculating rawOffset
-------------------------------------------------------
-------------------------------------------------------
Underground Weather Service url: http://api.wunderground.com/api/87582/conditions/forecast/lang:EN/pws:1/q/-34.5873579,-58.3915699.json
-------------------------------------------------------
-------------------------------------------------------
Traceback (most recent call last):
  File "./my-weather-indicator", line 69, in
    mwi = MWI()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 143, in __init__
    self.load_preferences()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 369, in load_preferences
    self.update_weather()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 158, in update_weather
    self.update_menu(i)
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 682, in update_menu
    weather = self.weatherservices[index].get_weather()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wundergroundapi.py", line 225, in get_weather
    weather_data = self._get_weather()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wundergroundapi.py", line 165, in _get_weather
    gvff('low', i, parsed_json)['fahrenheit'],
TypeError: string indices must be integers
And that's when I gave up on it:

colossus > sudo apt-get remove my-weather-indicator
[sudo] password for esteban:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  account-plugin-windows-live empathy-common folks-common
  gir1.2-geocodeglib-1.0 gir1.2-json-1.0 gnome-contacts gstreamer0.10-nice
  gstreamer0.10-plugins-good gstreamer0.10-x gstreamer1.0-nice guile-2.0-libs
  libavahi-gobject0 libfarstream-0.1-0 libfarstream-0.2-2 libfolks-eds25
  libfolks-telepathy25 libfolks25 libgc1c2 libgeocode-glib0 libgupnp-igd-1.0-4
  libhdb9-heimdal libkdc2-heimdal libmeanwhile1 libmission-control-plugins0
  libnice10 libntdb1 libpurple-bin libpurple0 libtelepathy-farstream3
  libtelepathy-logger3 libupstart1 libzephyr4 linux-headers-3.16.0-30
  linux-headers-3.16.0-30-generic linux-image-3.16.0-30-generic
  linux-image-extra-3.16.0-30-generic python-ntdb python3-dateutil
  python3-requests-oauthlib python3-tz signon-plugin-password telepathy-gabble
  telepathy-haze telepathy-logger telepathy-mission-control-5 telepathy-salut
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  my-weather-indicator
0 upgraded, 0 newly installed, 1 to remove and 14 not upgraded.
After this operation, 16.3 MB disk space will be freed.
Do you want to continue? [Y/n]


And then the repo:

colossus > sudo add-apt-repository --remove ppa:atareao/atareao
 Applications from atareao
 More info: https://launchpad.net/~atareao/+archive/ubuntu/atareao
Press [ENTER] to continue or ctrl-c to cancel removing it

Labels: , , , , , ,

0 Comments:

Post a Comment

<< Home