01-30-2019, 01:10 AM | #1 |
Fanatic
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
Can't do add_format anymore
Dear Kovid,
I use this command line to push (update) epub from Windows PC to Calibre content server on Raspberry Pie powered by ArchLinuxArm Code:
calibredb.exe add_format --with-library=<my remote Calibre> --username=<me> --password=<my password> <bookid> book.epub Code:
Python function terminated unexpectedly HTTP Error 400: Bad Request (Error Code: 1) Traceback (most recent call last): File "site.py", line 101, in main File "site.py", line 78, in run_entry_point File "site-packages\calibre\db\cli\main.py", line 255, in main File "site-packages\calibre\db\cli\main.py", line 55, in run_cmd File "site-packages\calibre\db\cli\cmd_add_format.py", line 56, in main File "site-packages\calibre\db\cli\main.py", line 191, in run File "site-packages\calibre\db\cli\main.py", line 213, in remote_run File "site-packages\mechanize\_mechanize.py", line 239, in open_novisit File "site-packages\mechanize\_mechanize.py", line 310, in _mech_open mechanize._response.httperror_seek_wrapper: HTTP Error 400: Bad Request If you implement "update/delete formats", this is no longer my issue. I tried to use SSH too. The following command line used to work too (I always copy and paste, change only the bookid. Code:
calibredb add_format <id> "/home/alarm/update/update.epub" --with-library=http://localhost:port/#Library --username=xxx --password=yyy Code:
Traceback (most recent call last): File "/usr/bin/calibredb", line 20, in <module> sys.exit(main()) File "/usr/lib/calibre/calibre/db/cli/main.py", line 255, in main return run_cmd(cmd, opts, args[1:], DBCtx(opts)) File "/usr/lib/calibre/calibre/db/cli/main.py", line 55, in run_cmd ret = m.main(opts, args, dbctx) File "/usr/lib/calibre/calibre/db/cli/cmd_add_format.py", line 56, in main if not dbctx.run('add_format', id, dbctx.path(path), fmt, opts.replace): File "/usr/lib/calibre/calibre/db/cli/main.py", line 191, in run return self.remote_run(name, m, *args) File "/usr/lib/calibre/calibre/db/cli/main.py", line 213, in remote_run res = self.br.open_novisit(rq) File "/usr/lib/python2.7/site-packages/mechanize/_mechanize.py", line 238, in open_novisit url_or_request, data, visit=False, timeout=timeout) File "/usr/lib/python2.7/site-packages/mechanize/_mechanize.py", line 309, in _mech_open raise response mechanize._response.httperror_seek_wrapper: HTTP Error 400: Bad Request Last edited by nqk; 01-30-2019 at 01:25 AM. |
01-30-2019, 04:34 AM | #2 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
what versions of calibre do you have on the ARm and windows machines? IIRC this was a bug in some older versions of calibre. Update on both and you should be fine.
|
01-30-2019, 07:59 AM | #3 |
Fanatic
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
The latest one. I did pacman -Suy.
Sent from my ONEPLUS A3000 using Tapatalk |
01-30-2019, 09:18 AM | #4 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Downgrade python2-msgpack on your server to 0.5.6 and you will be fine.
|
02-03-2019, 01:04 AM | #5 |
Fanatic
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
I did system update today and all is fine.
🤗 Sent from my ONEPLUS A3000 using Tapatalk |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't connect anymore | Glorfindel | Feedback | 7 | 12-03-2014 12:46 PM |
add_format conditionally, without overwriting | kjonca | Library Management | 3 | 04-09-2013 08:29 AM |
So, we really can't speak anymore | EowynCarter | Library Management | 14 | 02-12-2011 06:19 PM |