Regarding to Comment #41: what happens if you replace the line with the following:
if (str(yahoo_woeid_result['ResultSet']['Error']) != "0")
does it then work always?
Regarding to Comment #41:
what happens if you replace the line with the following:
if (str(yahoo_ woeid_result[ 'ResultSet' ]['Error' ]) != "0")
does it then work always?