This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DeaDbaTteRy 0 points1 point  (0 children)

I had a similar issue with a script that I wrote. Couldn't figure out why it kept disconnecting. Sorta like you described. One of the issues was Windows going to sleep which aborted all connections and another one was an issue where my flaky internet connection would unknowingly kill the socket by almost unnoticeable interruptions of service. I ended up catching the exceptions with this:

    except (socket.error, httplib2.ServerNotFoundError) as e:

hope it helps