View Single Post
Old 01-03-2019, 03:48 AM   #1
Velk
Junior Member
Velk began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2019
Device: none
Remote add to content server using server directory instead of local directory

With calibre version 3.36.

Setup:

One windows 10 machine running calibre and content server.

One ubuntu linux machine with calibre installed but not running.

When I run calibredb on the linux machine to add books, e.g.

Code:
calibredb add --username USER --password PASS --with-library http://windows_machine:8000 /home/user/book_name/book.epub
everything works as expected.

When I try to use the -1, or 1 book per directory option to import at the directory level though, i.e.
Code:
calibredb add --username USER --password PASS --with-library http://windows_machine:8000 /home/user/book_name -1
It returns
Code:
Traceback (most recent call last):
  File "site-packages\calibre\srv\cdb.py", line 56, in cdb_run
  File "site-packages\calibre\db\cli\cmd_add.py", line 103, in implementation
  File "site-packages\calibre\db\cli\cmd_add.py", line 84, in format_group
  File "site-packages\calibre\startup.py", line 117, in local_open
IOError: [Errno 2] No such file or directory: u'E:/home/user/book_name/book.epub'
Note the unexpected E: that's been tacked on to the path - it seems to have stuck paths from the content server and from the machine running calibredb together somehow.

The server log has
Code:
Unhandled exception in state: State: sized_read Client: 192.168.0.2:55344 Request: POST /cdb/cmd/add/0 HTTP/1.1
Traceback (most recent call last):
  File "site-packages\calibre\srv\loop.py", line 569, in tick
  File "site-packages\calibre\srv\http_request.py", line 361, in sized_read
  File "site-packages\calibre\srv\http_request.py", line 220, in read
  File "tempfile.py", line 627, in write
  File "tempfile.py", line 537, in _check
  File "tempfile.py", line 542, in rollover
  File "tempfile.py", line 475, in NamedTemporaryFile
  File "tempfile.py", line 244, in _mkstemp_inner
OSError: [Errno 2] No such file or directory
This setup used to work prior to an upgrade to 3.34 - I'm not sure which version broke it, as I skipped a few prior to 3.34
Velk is offline   Reply With Quote