View Single Post
Old 01-07-2020, 10:54 AM   #99
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
The module has a test which you can run like this:

Code:
$ calibre-debug /home/eschwartz/git/calibre/src/calibre/ebooks/oeb/polish/create.py /tmp/foo.txt
Traceback (most recent call last):
  File "/usr/local/calibre-3/bin/calibre-debug", line 20, in <module>
    sys.exit(main())
  File "/home/eschwartz/git/calibre/src/calibre/debug.py", line 349, in main
    run_script(args[1], args[2:])
  File "/home/eschwartz/git/calibre/src/calibre/debug.py", line 261, in run_script
    exec_path(ef, g)
  File "/home/eschwartz/git/calibre/src/polyglot/builtins.py", line 103, in exec_path
    exec(code, ctx)
  File "/home/eschwartz/git/calibre/src/calibre/ebooks/oeb/polish/create.py", line 126, in <module>
    create_book(mi, path, fmt=ext)
  File "/home/eschwartz/git/calibre/src/calibre/ebooks/oeb/polish/create.py", line 45, in create_book
    f.write(mi.title)
TypeError: a bytes-like object is required, not 'str'
https://github.com/kovidgoyal/calibre/pull/1085
eschwartz is offline   Reply With Quote