Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
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
Old 01-03-2019, 05:57 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to use the -r option as well
kovidgoyal is offline   Reply With Quote
Old 01-03-2019, 06:02 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Actually, no this is likely an issue because of the linux + windows combination, I'll look into it when I have a moment.
kovidgoyal is offline   Reply With Quote
Old 01-03-2019, 06:05 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That should take care of it:

https://github.com/kovidgoyal/calibr...616c24a98ff57d
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote access to Calibre library, WITHOUT content server? haertig Calibre 1 10-18-2017 11:24 PM
calibredb to write to a remote content server? plo233 Calibre 7 10-05-2017 12:34 AM
Can we setup a DNS server to fake amazon's server and remote apply the jailbreak? zfu Kindle Developer's Corner 9 05-07-2015 10:08 AM
[Old Thread] Remote library support (not content server) mikew Calibre 18 05-29-2013 07:27 AM
Book directory on remote server sasilk Library Management 3 08-13-2011 11:10 AM


All times are GMT -4. The time now is 10:57 AM.


MobileRead.com is a privately owned, operated and funded community.