Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update catalog gets stuck at 96% #15

Open
seirl opened this issue Apr 10, 2016 · 13 comments
Open

Update catalog gets stuck at 96% #15

seirl opened this issue Apr 10, 2016 · 13 comments

Comments

@seirl
Copy link
Contributor

seirl commented Apr 10, 2016

Is it maybe linked to the HTTP 523 errors I see in the logs?

Unhandled exception in thread started by <bound method UpdateCatalogWorker.retrievePartialListOfAddons of <waitdlg.UpdateCatalogWorker object at 0x7f9e2ddfdc18>>
Traceback (most recent call last):
  File "/opt/lcurse/modules/waitdlg.py", line 294, in retrievePartialListOfAddons
    response = self.opener.open("http://www.curse.com/addons/wow?page=%d" % (page))
  File "/usr/lib/python3.4/urllib/request.py", line 470, in open
    response = meth(req, response)
  File "/usr/lib/python3.4/urllib/request.py", line 580, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.4/urllib/request.py", line 502, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 442, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 685, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 470, in open
    response = meth(req, response)
  File "/usr/lib/python3.4/urllib/request.py", line 580, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.4/urllib/request.py", line 508, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 442, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 588, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 523: Origin Unreachable
@seirl seirl changed the title Update catalog gets suck at 96% Update catalog gets stuck at 96% Apr 10, 2016
@seirl
Copy link
Contributor Author

seirl commented Apr 10, 2016

Since I can't provide you with a version information (there is none):

% md5sum /usr/bin/lcurse :(
149202d995e804756d9d99ab954d6fab /usr/bin/lcurse

@ephraim
Copy link
Owner

ephraim commented Apr 11, 2016

git revision is always the best version regarding a git repository.
So, which revision do you use? Hopefully the latest!

@seirl
Copy link
Contributor Author

seirl commented Apr 11, 2016

I'm using the PPA, actually. I can try with the repository if the ppa is not up to date.

@ephraim
Copy link
Owner

ephraim commented Apr 11, 2016

Which PPA :). I don't know anything about an PPA.

@seirl
Copy link
Contributor Author

seirl commented Apr 11, 2016

Oh okay, I'll install the git version then.

@seirl
Copy link
Contributor Author

seirl commented Apr 13, 2016

I can confirm it does that on the latest commit in master (d8e02ee).

@comprofix
Copy link

I am getting the same but gets stuck at 99%

master d8e02ee fix updateCatalog to reflect recent changes of curse page- second part

markup_type=markup_type))
Unhandled exception in thread started by >
Traceback (most recent call last):
  File "/usr/lib/python3.5/urllib/request.py", line 1240, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.5/http/client.py", line 1083, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1079, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 911, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 854, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 826, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.5/socket.py", line 693, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/moe/projects/lcurse/modules/waitdlg.py", line 294, in retrievePartialListOfAddons
    response = self.opener.open("http://www.curse.com/addons/wow?page=%d" % (page))
  File "/usr/lib/python3.5/urllib/request.py", line 465, in open
    response = self._open(req, data)
  File "/usr/lib/python3.5/urllib/request.py", line 483, in _open
    '_open', req)
  File "/usr/lib/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 1268, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.5/urllib/request.py", line 1242, in do_open
    raise URLError(err)
urllib.error.URLError: 

@seirl
Copy link
Contributor Author

seirl commented May 2, 2016 via email

@ephraim
Copy link
Owner

ephraim commented May 2, 2016

In both exceptions, it looks like the connection to curse.com got disconnected:
from first exception quote: urllib.error.HTTPError: HTTP Error 523: Origin Unreachable
from second exception quote: socket.gaierror: [Errno -2] Name or service not known

So I can't really reproduce it, as update catalog works here.

Does it get stuck all the time?

@comprofix
Copy link

No not happening all the time. For now it is downloading the catalogue successfully.

retrieved list of addons: 4083

@seirl
Copy link
Contributor Author

seirl commented May 4, 2016

Even if we lose the connection, not having anything that catches an exception to retry is not a sane behavior.

@MathyV
Copy link
Contributor

MathyV commented Jul 10, 2016

Try with my pull request #18 if you experience problems again. I can reproduce it easily (perhaps because of my location?) and it is solved for me now.

@snje1987
Copy link

snje1987 commented Aug 8, 2016

I also get this problem with the latest version. it's caused by the opener.open(str(url)) do not have a timeout. My internet connect is not so stable, sometimes this will cause a infinitely wait.

I tried to add a timeout there, but in the function OpenWithRetry, after maxcount times of retry, it will raise a Exception, which was not catched in function retrievePartialListOfAddons, finally terminate the working thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants