View Single Post
Old 01-30-2019, 01:10 AM   #1
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
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
It always worked, but I got this to day.

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
The server is still running.


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
I got this
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.
nqk is offline   Reply With Quote