calibredb crashed when add book to content-server

Bug #1878593 reported by Li Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

I tried to schedule auto-add book from a folder when content server is running using following command:

$ calibredb add --library-path=http://localhost:8080/#Manga -r /media/pi/Li/Calibre/Inbox/Manga

It failed with such traceback:

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.py", line 366, in main
    identifiers, lcodes, opts.filters
  File "/usr/lib/calibre/calibre/db/cli/cmd_add.py", line 175, in do_add
    'add', 'format_group', tuple(map(dbctx.path, formats)), add_duplicates)
  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/dist-packages/mechanize/_mechanize.py", line 199, in open_novisit
    return self._mech_open(url, data, visit=False, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 230, in _mech_open
    response = UserAgentBase.open(self, request, data)
  File "/usr/lib/python2.7/dist-packages/mechanize/_opener.py", line 193, in open
    response = urlopen(self, req, data)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 344, in _open
    '_open', req)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 332, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1142, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1115, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/usr/lib/python2.7/httplib.py", line 1058, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1098, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 1054, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 890, in _send_output
    msg += message_body
UnicodeDecodeError: 'utf8' codec can't decode byte 0x93 in position 0: invalid start byte

System:
Description: Raspbian GNU/Linux 10 (buster)
Release: 10

Calibre version:
calibre (calibre 3.39.1)

affects: calibre (Ubuntu) → calibre
Revision history for this message
Eli Schwartz (eschwartz) wrote :

This bug was initially reported against:

version 3.39, released Jan 31, 2019

At the time, the current version of calibre was:

version 4.16, released May 14, 2020

We are now at 34 minor releases and 2 major releases after the version the bug was reported against. calibre doesn't even use python2 anymore, which is where the error message came from.

Please upgrade to calibre 5.2 and check if it works as expected. calibre does not support versions from 2 years ago.

Changed in calibre:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.