This morning, a custom recipe I've been using for a few months failed with "An existing connection was forcibly closed by the remote host". The recipe simulates a login to the site's daily newspaper and then scrapes the HTML, so I tried manually logging in, and everything works fine.
Does anyone have any ideas what I can do to debug this? Is there a way to get more details about the error or to tell why the force-close happened?
I've attached the recipe (it requires a username and password to the Boston Globe). Here's the failure trace:
Code:
Python function terminated unexpectedly
<urlopen error [Errno 10054] An existing connection was forcibly closed by the remote host> (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\ebooks\conversion\cli.py", line 325, in main
File "site-packages\calibre\ebooks\conversion\plumber.py", line 979, in run
File "site-packages\calibre\customize\conversion.py", line 208, in __call__
File "site-packages\calibre\ebooks\conversion\plugins\recipe_input.py", line 104, in convert
File "site-packages\calibre\web\feeds\news.py", line 770, in __init__
File "<string>", line 61, in get_browser
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_mechanize.py", line 541, in submit
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_mechanize.py", line 203, in open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_mechanize.py", line 230, in _mech_open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_opener.py", line 204, in open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 457, in http_response
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_opener.py", line 221, in error
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 332, in _call_chain
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 571, in http_error_302
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_mechanize.py", line 203, in open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_mechanize.py", line 230, in _mech_open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_opener.py", line 204, in open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 457, in http_response
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_opener.py", line 221, in error
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 332, in _call_chain
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 571, in http_error_302
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_mechanize.py", line 203, in open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_mechanize.py", line 230, in _mech_open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_opener.py", line 193, in open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 344, in _open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 332, in _call_chain
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 1142, in http_open
File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_urllib2_fork.py", line 1118, in do_open
urllib2.URLError: <urlopen error [Errno 10054] An existing connection was forcibly closed by the remote host>