indicator-weather crashed with AttributeError in prepare_location_for_yahoo(): 'module' object has no attribute 'get_woeid_from_yahoo'

Bug #1187389 reported by Mattijs Riekerk
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Weather Indicator
Fix Released
Undecided
Unassigned

Bug Description

1. open terminal
2. start indicator-weather
3. click 'Set Up Weather'

In the terminal this error appears:
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `PreferencesDialog' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)

4. open Locations tab
5. click 'Add'

The same error appears

6. search for a location (Amsterdam)

Now this error appears in the terminal and the attached crash report is shown:
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 2446, in next_page
    if self.location.prepare_location(self.place_selected):
  File "/usr/bin/indicator-weather", line 327, in prepare_location
    self.prepare_location_for_yahoo(geonames_details)
  File "/usr/bin/indicator-weather", line 390, in prepare_location_for_yahoo
    woeid_result = pywapi.get_woeid_from_yahoo(displayed_city_name)
AttributeError: 'module' object has no attribute 'get_woeid_from_yahoo'

7. name the location
8. click apply

A new crash report is shown (bug #1187322) and the following error in the terminal:
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 2500, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 488, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: indicator-weather 13.05.27 [origin: LP-PPA-weather-indicator-team]
ProcVersionSignature: Ubuntu 3.2.0-45.70-generic-pae 3.2.44
Uname: Linux 3.2.0-45-generic-pae i686
ApportVersion: 2.0.1-0ubuntu17.2
Architecture: i386
CrashCounter: 1
CrashDB: indicator_weather
Date: Tue Jun 4 15:13:02 2013
ExecutablePath: /usr/bin/indicator-weather
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
InterpreterPath: /usr/bin/python2.7
MarkForUpload: True
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/indicator-weather
PythonArgs: ['/usr/bin/indicator-weather']
SourcePackage: indicator-weather
ThirdParty: True
Title: indicator-weather crashed with AttributeError in prepare_location_for_yahoo(): 'module' object has no attribute 'get_woeid_from_yahoo'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Mattijs Riekerk (mattijs-riekerk) wrote :
information type: Private → Public
Revision history for this message
Mattijs Riekerk (mattijs-riekerk) wrote :

I tried changing to the Weather.com sourche before step 4 because the report complains about Yahoo, but with no change in the result.

Revision history for this message
Joshua Tasker (jtasker) wrote :
Revision history for this message
Joshua Tasker (jtasker) wrote :

I can't reproduce this. Do the steps you listed cause this crash every single time?

Changed in weather-indicator:
status: New → Incomplete
Revision history for this message
Mattijs Riekerk (mattijs-riekerk) wrote :

I Upgraded the pywapi, but with no result.
It crashes every single time with exactly the same errors and reports.

I see you made bug #1187322 a duplicate of this one, but I get that crash too when I press the Add button.
So I don't think it's a duplicate, but related.

I don't know how to provide you with more info...
When I get back home this afternoon I will install it on my desktop, there I have a fresh Ubuntu install.
I will let you know what the result is.

Revision history for this message
Joshua Tasker (jtasker) wrote :

What is the output of running the following commands in a terminal?

sudo updatedb
locate pywapi.py

Revision history for this message
Mattijs Riekerk (mattijs-riekerk) wrote :

/usr/lib/python2.7/dist-packages/pywapi.py
/usr/lib/python2.7/dist-packages/pywapi.pyc
/usr/local/lib/python2.7/dist-packages/pywapi.py
/usr/local/lib/python2.7/dist-packages/pywapi.pyc
/usr/share/pyshared/pywapi.py

Revision history for this message
Joshua Tasker (jtasker) wrote :

Ok, what is the output of these commands?

1st command:
grep get_woeid_from_yahoo /usr/lib/python2.7/dist-packages/pywapi.py

2nd command:
grep get_woeid_from_yahoo /usr/local/lib/python2.7/dist-packages/pywapi.py

3rd command
ls -l /usr/share/pyshared/pywapi.py

4th command
ls -l /usr/local/lib/python2.7/dist-packages/pywapi.py

Revision history for this message
Mattijs Riekerk (mattijs-riekerk) wrote :

1st command:
grep get_woeid_from_yahoo /usr/lib/python2.7/dist-packages/pywapi.py

    woeid_data = get_woeid_from_yahoo(search_string)
def get_woeid_from_yahoo(search_string):

2nd command:
grep get_woeid_from_yahoo /usr/local/lib/python2.7/dist-packages/pywapi.py

no output.... ???

3rd command
ls -l /usr/share/pyshared/pywapi.py

-rw-r--r-- 1 root root 34835 jun 2 20:11 /usr/share/pyshared/pywapi.py

4th command
ls -l /usr/local/lib/python2.7/dist-packages/pywapi.py

-rw-rw-r-- 1 root staff 20290 mrt 13 23:06 /usr/local/lib/python2.7/dist-packages/pywapi.py

Revision history for this message
Joshua Tasker (jtasker) wrote : [Weather-indicator-team] [Bug 1187389] Re: indicator-weather crashed with AttributeError in prepare_location_for_yahoo(): 'module' object has no attribute 'get_woeid_from_yahoo'
Download full text (4.1 KiB)

Delete /usr/local/lib/python2.7 /dist-packages/pywapi.py  And then run Weather Indicator again. In fact, you could probably delete the whole   /usr/local/lib/python2.7  Directory, just check to see that there aren't any other files in it.

1st command:

grep get_woeid_from_yahoo /usr/lib/python2.7/dist-packages/pywapi.py

    woeid_data = get_woeid_from_yahoo(search_string)

def get_woeid_from_yahoo(search_string):

2nd command:

grep get_woeid_from_yahoo /usr/local/lib/python2.7/dist-packages/pywapi.py

no output.... ???

3rd command

ls -l /usr/share/pyshared/pywapi.py

-rw-r--r-- 1 root root 34835 jun 2 20:11 /usr/share/pyshared/pywapi.py

4th command

ls -l /usr/local/lib/python2.7/dist-packages/pywapi.py

-rw-rw-r-- 1 root staff 20290 mrt 13 23:06 /usr/local/lib/python2.7

/dist-packages/pywapi.py

--
You received this bug notification because you are a member of Weather

Indicator Team, which is subscribed to the bug report.

https://bugs.launchpad.net/bugs/1187389

Title:

  indicator-weather crashed with AttributeError in

  prepare_location_for_yahoo(): 'module' object has no attribute

  'get_woeid_from_yahoo'

Status in Indicator-Weather:

  Incomplete

Bug description:

  1. open terminal

  2. start indicator-weather

  3. click 'Set Up Weather'

  In the terminal this error appears:

  /usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `PreferencesDialog' can't be set after construction

    Gtk.Window.__init__(self, type=type, **kwds)

  4. open Locations tab

  5. click 'Add'

  The same error appears

  6. search for a location (Amsterdam)

  Now this error appears in the terminal and the attached crash report is shown:

  Traceback (most recent call last):

    File "/usr/bin/indicator-weather", line 2446, in next_page

      if self.location.prepare_location(self.place_selected):

    File "/usr/bin/indicator-weather", line 327, in prepare_location

      self.prepare_location_for_yahoo(geonames_details)

    File "/usr/bin/indicator-weather", line 390, in prepare_location_for_yahoo

      woeid_result = pywapi.get_woeid_from_yahoo(displayed_city_name)

  AttributeError: 'module' object has no attribute 'get_woeid_from_yahoo'

  7. name the location

  8. click apply

  A new crash report is shown (bug #1187322) and the following error in the terminal:

  Traceback (most recent call last):

    File "/usr/bin/indicator-weather", line 2500, in on_apply

      (location_code, location_details) = self.location.export_location_details()

    File "/usr/bin/indicator-weather", line 488, in export_location_details

      return (self.location_code, self.location_details)

  AttributeError: Location instance has no attribute 'location_code'

  ProblemType: Crash

  DistroRelease: Ubuntu 12.04

  Package: indicator-weather 13.05.27 [origin: LP-PPA-weather-indicator-team]

  ProcVersionSignature: Ubuntu 3.2.0-45.70-generic-pae 3.2.44

  Uname: Linux 3.2.0-45-generic-pae i686

  ApportVersion: 2.0.1-0ubuntu17.2

  Architecture: i386

  CrashCounter: 1

  CrashDB: indicator_weather

  Date: Tue Jun 4 15:13:02 2...

Read more...

Revision history for this message
Mattijs Riekerk (mattijs-riekerk) wrote :

YES!!!!!!

Changed in weather-indicator:
status: Incomplete → Fix Released
Revision history for this message
Nand0 (ferdinandpc) wrote :

I upgrade the pywapi to 0.3.3 and now run ;)

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

Other bug subscribers

Remote bug watches

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