我的天气指示器404错误

我今天早上起床,注意到我的天气指示不起作用。 当我从终端运行它时,我得到:

 No LSB modules are available. ##################################################### Distributor ID: Ubuntu Description: Ubuntu 12.04.2 LTS Release: 12.04 Codename: precise Version: x86_64 ##################################################### My-Weather-Indicator version: 0.6.1.2.precise.1 ##################################################### ('/home/chrispche/.config/my-weather-indicator/my-weather-indicator.conf', True) {"time":"2013-02-28 11:19","countryName":"United Kingdom","sunset":"2013-02-28 17:35","rawOffset":0,"dstOffset":1,"countryCode":"GB","gmtOffset":0,"lng":0.7,"sunrise":"2013-02-28 06:45","timezoneId":"Europe/London","lat":51.5333} Searching url: http://where.yahooapis.com/geocode?q=51.5333,+0.7&gflags=R&flags=J&appid=_slN0oHV34Exg09kl5EASmbGBs5y3GJES1N.Oon0wd5Lnh6E5hGdtQmx_MdxpOxKAzftS1dB0yNI_NzTpWaKFXEm GID HTTP Error 404: Not Found 92.232.83.84OKGBGBRUnited KingdomM5Southend-on-SeaSouthend-on-seaSS251.53330.70000Europe/London Yahoo Weather Service, not found woeid Traceback (most recent call last): File "/opt/extras.ubuntu.com/my-weather-indicator/bin/my-weather-indicator", line 46, in  mwi=MWI() File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 136, in __init__ self.load_preferences() File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 363, in load_preferences self.work() File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 196, in work self.set_menu() File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 465, in set_menu temporal_current_conditions = weather['current_conditions'] TypeError: 'NoneType' object has no attribute '__getitem__' 

有没有人有任何想法,为什么昨晚关闭我的电脑,一切正常,我应该突然得到这个,当我今天早上再打开它。

where.yahooapis.com/geocode似乎失败了。 我看到了同样的事情。 调用此URL的脚本已经运行了大约10个月。 今天停止了工作。

也许雅虎停止提供这项服务,或者你(和我)最多只能提供2000。 请求每天限制。 但话说回来,你不会期望获得404。

更多信息在这里

您的地理编码提取中似乎有些错误: GID HTTP Error 404: Not Found 。 我认为通常应该通过错误消息捕获。

这里有一个非常相似的bug报告: https : //answers.launchpad.net/my-weather-indicator/+question/219983

在那里工作的答案是:

你提供了错误的纬度和错误的经度。程序无法找到你的位置,城市,国家等所有信息都是空白的。因此MWI将无法显示。 也许你有一个错误的配置文件。尝试删除〜/ .config / my-weather-indicator / my-weather-indicator.conf,之后重启你的程序。

尝试删除~/.config/my-weather-indicator/my-weather-indicator.conf并重启。

不确定这是否属于错误。

同样的问题。 雅虎似乎已经删除了GeoCode服务。 这是“官方”回复。 我建议切换到Google(2500每日请求限制)或MapQuest(由OpenStreetMaps支持,没有请求限制)。 我个人会去看看MapQuest / OpenStreetMap,因为当Google把我踢开时,我需要另一个备份。

http://developer.yahoo.com/forum/General-Discussion-at-YDN/Yahoo-GeoCode-404-Not-Found/1362061375511-7faa66ba-191d-4593-ba63-0bb8f5d43c06#forum-topic-reply-form

删除〜/ .config / my-weather-indicator / my-weather-indicator.conf然后再次运行它。 为天气服务选择雅虎以外的其他东西。 World Weather Online将在8月份更改其API,因此它可能会给您带来问题。 Wunderground非常适合纽约市。 不确定它在世界其他地方的情况。 你必须注册这两个中的任何一个,但这很容易。 这是一个解释如何操作的链接http://www.webupd8.org/2013/02/how-to-use-your-own-weather-services.html 。 自从我这样做以来,它一直对我很好。

似乎/ geocode api已经消失了,就像我今天有几个应用程序和网站失败(从10:20 gmt)。

无论传递的参数是什么,任何对/ geocode的请求都会失败,因此这不是您应用中的错误。

我的解决方案是切换到googles api进行地理定位,但这可能不适合你。

    Interesting Posts