Cannot add location when name has accent

Bug #1329317 reported by Rael Gugelmin Cunha
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Weather Indicator
New
Undecided
Unassigned

Bug Description

I've installed packages from this PPA, from 13.10 into 14.04.

If I add a location without accent in the name, like "Washigton", it works fine.

If I try accented location names, like most of cities here in Brazil, by example "São Carlos", the Add New Location dialog never finish to add the location (the searching spin keeps looping forever and I cannot click in the "Continue" button).

This is the output at the command line:

23:34 /usr/share/applications$ indicator-weather
/usr/lib/python2.7/urllib.py:1288: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  return ''.join(map(quoter, s))
Exception in thread Location:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/bin/indicator-weather", line 2827, in build_location
    result, error_type = self.location.prepare_location(geonames_details)
  File "/usr/bin/indicator-weather", line 363, in prepare_location
    self.prepare_location_for_weather_com(geonames_details)
  File "/usr/bin/indicator-weather", line 513, in prepare_location_for_weather_com
    loc_id_result = pywapi.get_loc_id_from_weather_com(displayed_city_name)
  File "/usr/lib/python2.7/dist-packages/pywapi.py", line 856, in get_loc_id_from_weather_com
    url = LOCID_SEARCH_URL % quote(search_string)
  File "/usr/lib/python2.7/urllib.py", line 1288, in quote
    return ''.join(map(quoter, s))
KeyError: u'\xe3'

Revision history for this message
Ion Batîr (ionbatir) wrote :

I fixed it. Install ASCII transliterations of Unicode text (Python module) https://apps.ubuntu.com/cat/applications/quantal/python-unidecode/
For my it works ;)

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.