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
timeout exceptions #67
Comments
Yup I stll get those a lot too. Often to lastfm and not musicbrainz surprisingly. |
I cared so much I learned how to work both python and git. (Though I can't guarantee I did either well. :) |
Tidy up retrying webservice lookup code. Closed by f934232.
|
Still failing:
|
Right so it's a socket error. It's probably safe to catch all socket exceptions and just retry on them. I wasn't so keen to do that on IO Errors. |
urllib bug turns the socket error into a malformed IOError instead. http://bugs.python.org/issue6471 Hopefully this commit will finally end this: 27ef1de |
so close!
|
Hmm line 73 is a comment here. Can you send the full stacktrace? |
Sorry, updated copy is line 77.
urllib2 docs suggest HTTPError is a subclass of URLError, and the exception handler for URLError is catching it. However, there's no reason attribute? There is a code, and in my particular case, it's a 400. The error is trying to talk to last.fm - does it gets per-track data that might be corrupt at their end? |
Wow totally loving the consistency of urllib exceptions. So this time it's HTTPError.msg not reason even though it inherits from URLError where it's reason. I do have concerns about it being a 400 though. That usually implies the request could not be understood by the server and technically shouldn't be retried on. This probably means it won't fix the problem, you'll just get 3 400s and then it'll fail. I've changed it to print out the URL it's trying and then re-raise the exception. This way we can hopefully nail down why it's causing a 400. |
first tries with fresh install on gentoo x64 and got timeout issues too Mon Apr 11 17:17:09 2011: File "/usr/lib64/python2.7/site-packages/renamealbum/albumidentify.py", line 56, in get_dir_info |
11:01 < alastair> sigh :(
11:01 < alastair> timeoutexception
11:01 < alastair> should really fix that now
(Note: seem to commonly get
URLError: <urlopen error timed out>
andIOError: [Errno socket error] timed out
.)The text was updated successfully, but these errors were encountered: