These are chat archives for praw-dev/praw

1st
Apr 2017
artbn
@artbn
Apr 01 2017 02:28

Hi guys.

I have recently started learning how to code reddit bots to help preform certain tasks in /r/livecounting. I'm not sure if this is the best place to ask questions, but I'm running into some problems while running my bot.

I'm trying to code a trivia bot that posts to reddit live with questions every minute. The bot works great, the only problem is that after an hour or so of it running, it hits a problem with a long error that ends with:

prawcore.exceptions.RequestException: error with request HTTPSConnectionPool(host='www.reddit.com', port=443): Read timed out. (read timeout=16.0)

Any way around this? Would greatly appreciate the help

David Schmidt
@d-schmidt
Apr 01 2017 08:37
@artbn does except ignore retry work? Which request is sent?
artbn
@artbn
Apr 01 2017 13:14

request is to post on live thread

I tried using except for except requests.Timeout as err: but I got an error saying requests.Timeout doesn't work

David Schmidt
@d-schmidt
Apr 01 2017 17:36
the error message above contains your exception to catch: prawcore.exceptions.RequestException. import prawcore before
David Schmidt
@d-schmidt
Apr 01 2017 19:06
@bboe #770