Red Hat Bugzilla – Bug 1471389
calibredb unable to connect to the new Calibre 3 content server
Last modified: 2018-05-29 07:41:06 EDT
Since version 3.0 Calibre includes a new Content server . Trying to interface with this server using the command line tool calibredb leads to the following error:
$ calibredb search XXX --username XXX --password XXX --with-library "http://localhost:8080/#calibre-library"
Traceback (most recent call last):
File "/usr/bin/calibredb", line 20, in <module>
File "/usr/lib64/calibre/calibre/db/cli/main.py", line 250, in main
return run_cmd(cmd, opts, args[1:], DBCtx(opts))
File "/usr/lib64/calibre/calibre/db/cli/main.py", line 54, in run_cmd
ret = m.main(opts, args, dbctx)
File "/usr/lib64/calibre/calibre/db/cli/cmd_search.py", line 45, in main
ids = dbctx.run('search', q)
File "/usr/lib64/calibre/calibre/db/cli/main.py", line 188, in run
return self.remote_run(name, m, *args)
File "/usr/lib64/calibre/calibre/db/cli/main.py", line 208, in remote_run
res = self.br.open_novisit(rq)
File "/usr/lib/python2.7/site-packages/mechanize/_mechanize.py", line 199, in open_novisit
return self._mech_open(url, data, visit=False, timeout=timeout)
File "/usr/lib/python2.7/site-packages/mechanize/_mechanize.py", line 230, in _mech_open
response = UserAgentBase.open(self, request, data)
File "/usr/lib/python2.7/site-packages/mechanize/_opener.py", line 193, in open
response = urlopen(self, req, data)
File "/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py", line 344, in _open
File "/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py", line 332, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py", line 1142, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/site-packages/mechanize/_urllib2_fork.py", line 1115, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib64/python2.7/httplib.py", line 1042, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.7/httplib.py", line 1082, in _send_request
File "/usr/lib64/python2.7/httplib.py", line 1038, in endheaders
File "/usr/lib64/python2.7/httplib.py", line 880, in _send_output
msg += message_body
UnicodeDecodeError: 'utf8' codec can't decode byte 0x91 in position 0: invalid start byte
According to Kovid Goyal this is caused by an outdated version of python-mechanize . Fedora still ships version 0.2.5 (which was released in 2011). As of today, the latest version is 0.3.5 .
Bug 1432447 already tracks new releases of python-mechanize, but nobody seems to care.
I have built new python-mechanize in rawhide, but it needs python-webencodings for tests, so I want to get that package added and used before pushing it to stable releses. Additionally I had to update python-html5lib and it also needs python-webencodings for tests.
So, hopefully soon I will push all these to 26.
I can confirm that rawhide is working with the calibredb now and the new mechanize.
Yes, indeed, calibredb works as expected after installing the new mechanize and html5lib packages. Thank you very much!
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.