Happens here as well:
Traceback (most recent call last): File "/usr/bin/indicator-weather", line 1893, in on_apply (location_code, location_details) = self.location.export_location_details() File "/usr/bin/indicator-weather", line 406, in export_location_details return (self.location_code, self.location_details) AttributeError: Location instance has no attribute 'location_code'
Turns out it's a problem at line 362, where it checks for errors from Yahoo:
if (yahoo_woeid_result['ResultSet']['Error'] != 0) and (yahoo_woeid_result['ResultSet']['Results'] != None):
is always true because yahoo_woeid_result['ResultSet']['Error'] is a string; I fixed it by comparing with a string as well:
if (yahoo_woeid_result['ResultSet']['Error'] != '0') and (yahoo_woeid_result['ResultSet']['Results'] != None):
so it's an easy fix
However, I take a _big_ issue with this:
yahoo_woeid_result = eval(s)
where s is a JSON string; you're kidding, right?
Happens here as well:
Traceback (most recent call last): indicator- weather" , line 1893, in on_apply export_ location_ details( ) indicator- weather" , line 406, in export_ location_ details code, self.location_ details)
File "/usr/bin/
(location_code, location_details) = self.location.
File "/usr/bin/
return (self.location_
AttributeError: Location instance has no attribute 'location_code'
Turns out it's a problem at line 362, where it checks for errors from Yahoo:
if (yahoo_ woeid_result[ 'ResultSet' ]['Error' ] != 0) and (yahoo_ woeid_result[ 'ResultSet' ]['Results' ] != None):
is always true because yahoo_woeid_ result[ 'ResultSet' ]['Error' ] is a string; I fixed it by comparing with a string as well:
if (yahoo_ woeid_result[ 'ResultSet' ]['Error' ] != '0') and (yahoo_ woeid_result[ 'ResultSet' ]['Results' ] != None):
so it's an easy fix
However, I take a _big_ issue with this:
where s is a JSON string; you're kidding, right?