I'm attempting to test the typical command to add in to my crontab to update my library on a headless server:
Code:
calibredb add /array/media/books/* --with-library http://localhost:8001/#books --username user --password pass
The command begins to execute, hangs for 8-10 seconds without any console return, and then kicks back with the following trace:
Quote:
Traceback (most recent call last):
File "site.py", line 77, in main
File "site-packages/calibre/db/cli/main.py", line 257, in main
File "site-packages/calibre/db/cli/main.py", line 54, in run_cmd
File "site-packages/calibre/db/cli/cmd_add.py", line 383, in main
File "site-packages/calibre/db/cli/cmd_add.py", line 192, in do_add
File "site-packages/calibre/db/cli/main.py", line 190, in run
File "site-packages/calibre/db/cli/main.py", line 212, in remote_run
File "site-packages/mechanize/_mechanize.py", line 238, in open_novisit
File "site-packages/mechanize/_mechanize.py", line 283, in _mech_open
File "site-packages/mechanize/_opener.py", line 193, in open
File "site-packages/mechanize/_urllib2_fork.py", line 375, in _open
File "site-packages/mechanize/_urllib2_fork.py", line 363, in _call_chain
File "site-packages/mechanize/_urllib2_fork.py", line 1200, in http_open
File "site-packages/mechanize/_urllib2_fork.py", line 1182, in do_open
URLError: <urlopen error [Errno 32] Broken pipe>
|
I looked in that function on _urlib2_fork.py, and the only point I can see this sort of error creeping up is on a
on a host connection toward the bottom of the func.
I do think I have a valid initial connection because I get valid returns from calibre if I form the calibredb command wrong, such as needing user/pass or name the library incorrectly.
I notice the host object has a timeout variable and I can't see where that's getting set. It makes sense that a timeout of some sort would indicate a dead connection if there isn't a return. Scanning the dir does take a bit of time when I've added while Calibre is stopped.
Really, all I'm looking for is the right way to keep my lib updated.