URLError in weather applet

Bug #332504 reported by onox
4
Affects Status Importance Assigned to Milestone
Awn Extras
Fix Released
Low
onox

Bug Description

Just found this in the output of avant-window-navigator:

Weather Applet: Unexpected error while fetching conditions:
Traceback (most recent call last):
  File "/usr/share/avant-window-navigator/applets/weather/weather.py", line 351, in fetchConditions
    usock = urllib2.urlopen(url)
  File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
    return _opener.open(url, data)
  File "/usr/lib/python2.5/urllib2.py", line 381, in open
    response = self._open(req, data)
  File "/usr/lib/python2.5/urllib2.py", line 399, in _open
    '_open', req)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.5/urllib2.py", line 1107, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
    raise URLError(err)
URLError: <urlopen error timed out>

Tags: applet weather

Related branches

onox (onox)
description: updated
Changed in awn-extras:
assignee: nobody → mrooney
importance: Undecided → Medium
Revision history for this message
Michael Rooney (mrooney) wrote :

Hmm, with only this information this just seems like an http timeout, nothing particularly strange, unless it is happening constantly. Requests can time out due to a problem with weather.com or the local network. Does it have any negative effect on the applet? I would expect the next update to grab the weather again.

Changed in awn-extras:
importance: Medium → Low
status: New → Incomplete
Revision history for this message
onox (onox) wrote :

It doesn't happen constantly, and I don't know what consequences it has, maybe just that it cannot show the new data. But you should still catch this exception and do something with it. I think you should just ignore it, but if it happens 'multiple times' / constantly, then display an error.

Revision history for this message
moonbeam (rcryderman) wrote : Re: [Bug 332504] Re: URLError in weather applet

If you do decide to display an error after multiple occurrences of this
error please do it through libnotify. Applets that bring up annoying
dialogs (mail in the past did this) caused by network errors are a bad idea
IMO.

Revision history for this message
onox (onox) wrote :

When I waked up this morning I saw these errors:

Weather Applet: Unexpected error while fetching conditions:
Traceback (most recent call last):
  File "/usr/share/avant-window-navigator/applets/weather/weather.py", line 351, in fetchConditions
    usock = urllib2.urlopen(url)
  File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
    return _opener.open(url, data)
  File "/usr/lib/python2.5/urllib2.py", line 381, in open
    response = self._open(req, data)
  File "/usr/lib/python2.5/urllib2.py", line 399, in _open
    '_open', req)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.5/urllib2.py", line 1107, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
    raise URLError(err)
URLError: <urlopen error (-3, 'Temporary failure in name resolution')>

Weather Applet: Unexpected error while fetching forecast:
Traceback (most recent call last):
  File "/usr/share/avant-window-navigator/applets/weather/forecast.py", line 61, in fetchForecast
    usock = urllib.urlopen(url)
  File "/usr/lib/python2.5/urllib.py", line 82, in urlopen
    return opener.open(url)
  File "/usr/lib/python2.5/urllib.py", line 190, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.5/urllib.py", line 325, in open_http
    h.endheaders()
  File "/usr/lib/python2.5/httplib.py", line 860, in endheaders
    self._send_output()
  File "/usr/lib/python2.5/httplib.py", line 732, in _send_output
    self.send(msg)
  File "/usr/lib/python2.5/httplib.py", line 699, in send
    self.connect()
  File "/usr/lib/python2.5/httplib.py", line 667, in connect
    socket.SOCK_STREAM):
IOError: [Errno socket error] (-3, 'Temporary failure in name resolution')

Weather Applet: Unexpected error while fetching forecast:
Traceback (most recent call last):
  File "/usr/share/avant-window-navigator/applets/weather/forecast.py", line 61, in fetchForecast
    usock = urllib.urlopen(url)
  File "/usr/lib/python2.5/urllib.py", line 82, in urlopen
    return opener.open(url)
  File "/usr/lib/python2.5/urllib.py", line 190, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.5/urllib.py", line 328, in open_http
    errcode, errmsg, headers = h.getreply()
  File "/usr/lib/python2.5/httplib.py", line 1199, in getreply
    response = self._conn.getresponse()
  File "/usr/lib/python2.5/httplib.py", line 928, in getresponse
    response.begin()
  File "/usr/lib/python2.5/httplib.py", line 385, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.5/httplib.py", line 343, in _read_status
    line = self.fp.readline()
  File "/usr/lib/python2.5/socket.py", line 331, in readline
    data = recv(1)
IOError: [Errno socket error] (104, 'Connection reset by peer')

Revision history for this message
Michael Rooney (mrooney) wrote :

These look like problems with your network connection or other random
issues. I could catch them but I am not sure there is a point; I think the
update silently failing is normal behavior in this case. Perhaps adding a
libnotify message if the update fails twice in a row could be nice. What
exactly do you want to happen?

onox (onox)
Changed in awn-extras:
assignee: mrooney → onox
milestone: none → 0.4.0
onox (onox)
Changed in awn-extras:
status: Incomplete → Triaged
onox (onox)
Changed in awn-extras:
status: Triaged → In Progress
Revision history for this message
onox (onox) wrote :

Fixed in revision 1873. A notification will be shown if an error occurs.

Changed in awn-extras:
status: In Progress → Fix Committed
Mark Lee (malept)
Changed in awn-extras:
status: Fix Committed → Fix Released
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.