Quote:
Originally Posted by rashkae
This is actually pretty big breakage to my exiting use case. I'll work around it simply by creating a server start script that clones a new copy of the library just for the server, but a server option, (or alternate binary) that does not modify database would be ideal.
|
Quote:
Originally Posted by kovidgoyal
I'm afraid that is not going to happen. What is your use case? Remember that you can now connect to a running server with calibredb. ABout the only thing you cant do now, that you could before is run calibre-server and the GUI at the same time. Instead you have to run the server embedded in the GUI.
|
Quote:
Originally Posted by rashkae
The server auto starts and runs as a service.. The gui is run when I'm logged in as desktop app.. pretty clear distinction there.
|
I
dealt intend to deal with this by creating wrapper scripts that run things against the server I have launched as a systemd service.
Though I have always used a wrapper script for `calibre`, to make it run calibre-debug -g and log to a /tmp file.
...
Kovid, I cannot figure out how to run either `calibre` or `calibre-debug -g` with the necessary options passed.
Code:
calibre-debug: error: no such option: --with-library
Code:
calibre: error: no such option: --username
Also, I keep getting errors when I try running calibredb list as a test against the server.
Code:
[eschwartz@arch ~]$ calibredb list --with-library "http://0.0.0.0:8080/#Amazon" --username XXXXXX --password XXXX
Traceback (most recent call last):
File "/usr/bin/calibredb", line 20, in <module>
sys.exit(main())
File "/home/eschwartz/git/calibre/src/calibre/db/cli/main.py", line 251, in main
return run_cmd(cmd, opts, args[1:], DBCtx(opts))
File "/home/eschwartz/git/calibre/src/calibre/db/cli/main.py", line 55, in run_cmd
ret = m.main(opts, args, dbctx)
File "/home/eschwartz/git/calibre/src/calibre/db/cli/cmd_list.py", line 324, in main
for_machine=opts.for_machine
File "/home/eschwartz/git/calibre/src/calibre/db/cli/cmd_list.py", line 150, in do_list
ans = dbctx.run('list', fields, sort_by, ascending, search_text, limit)
File "/home/eschwartz/git/calibre/src/calibre/db/cli/main.py", line 189, in run
return self.remote_run(name, m, *args)
File "/home/eschwartz/git/calibre/src/calibre/db/cli/main.py", line 209, in remote_run
res = self.br.open_novisit(rq)
File "/usr/lib/python2.7/site-packages/mechanize/_mechanize.py", line 239, in open_novisit
url_or_request, data, visit=False, timeout=timeout)
File "/usr/lib/python2.7/site-packages/mechanize/_mechanize.py", line 284, in _mech_open
response = UserAgentBase.open(self, request, data)
File "/usr/lib/python2.7/site-packages/mechanize/_opener.py", line 195, in open
response = urlopen(self, req, data)
File "/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py", line 352, in _open
'_open', req)
File "/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py", line 340, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py", line 1185, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py", line 1154, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib/python2.7/httplib.py", line 1042, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1082, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 1038, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 880, in _send_output
msg += message_body
UnicodeDecodeError: 'utf8' codec can't decode byte 0x95 in position 0: invalid start byte