sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
951 stars 403 forks source link

weather timeout #91

Closed tyrope closed 12 years ago

tyrope commented 12 years ago

[1702.12] .weather EHAM [1702.14] [DEVMSG]weather.py:96; EHAM 271455Z 17011KT CAVOK 20/12 Q1016 NOSIG [1702.33] <@ Willie> timeout: timed out (file "/usr/local/lib/python2.7/socket.py", line 447, in readline)

[1703.35] <~Tyrope> .weather EHAM [1703.36] [DEVMSG]weather.py:96; EHAM 271455Z 17011KT CAVOK 20/12 Q1016 NOSIG [1703.57] <@ Willie> timeout: timed out (file "/usr/local/lib/python2.7/socket.py", line 447, in readline)

[1703.55] .weather amsterdam [1703.56] [DEVMSG]weather.py:96; EHAM 271455Z 17011KT CAVOK 20/12 Q1016 NOSIG [1704.01] <@ Willie> Clear ☼, 20°C, 1016mb, Moderate breeze 11kt (↑) - EHAM 14:55Z

It got the data all three times, why didn't it report it for when "EHAM" was requested?

edit: now it works, wtf? [1706.36] <@ Hao-studies> .weather EHAM [1706.37] [DEVMSG]weather.py:96; EHAM 271455Z 17011KT CAVOK 20/12 Q1016 NOSIG [1706.38] <@ Willie> Clear ☼, 20°C, 1016mb, Moderate breeze 11kt (↑) - EHAM 14:55Z

elad661 commented 12 years ago
from #YourPants-nl at 2012-08-27 11:03:57.507885:
Message was: <Tyrope> .weather EHAM
Traceback (most recent call last):
  File "/home/willie/jenni/bot.py", line 298, in call
    func(jenni, trigger)
  File "/home/willie/jenni/modules/weather.py", line 197, in f_weather
    time = local(icao_code, hour, minute)
  File "/home/willie/jenni/modules/weather.py", line 39, in local
    try: bytes = web.get(uri % icao)
  File "/home/willie/jenni/web.py", line 36, in get
    u = get_urllib_object(uri, timeout)
  File "/home/willie/jenni/web.py", line 96, in get_urllib_object
    try: u = urllib2.urlopen(req, None, timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/usr/local/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/usr/local/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/urllib2.py", line 1207, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/local/lib/python2.7/urllib2.py", line 1180, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/local/lib/python2.7/httplib.py", line 1030, in getresponse
    response.begin()
  File "/usr/local/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline()
  File "/usr/local/lib/python2.7/socket.py", line 447, in readline
    data = self._sock.recv(self._rbufsize)
timeout: timed out
----------------------------------------
elad661 commented 12 years ago

Haven't seen this in a while, must've been a temporary server hiccup. Closing.