Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-20-2022, 02:19 AM   #1
asm0dey
Junior Member
asm0dey began at the beginning.
 
asm0dey's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2022
Device: Pocketbook 302
calibredb add failes

When I run command
Code:
calibredb add -r ../Books/native/ --with-library .
I get an error
Ian Fleming
Code:
Traceback (most recent call last):
  File "/usr/bin/calibredb", line 21, in <module>
    sys.exit(main())
  File "/usr/lib/calibre/calibre/db/cli/main.py", line 250, in main
    return run_cmd(cmd, opts, args[1:], DBCtx(opts))
  File "/usr/lib/calibre/calibre/db/cli/main.py", line 40, in run_cmd
    ret = m.main(opts, args, dbctx)
  File "/usr/lib/calibre/calibre/db/cli/cmd_add.py", line 474, in main
    do_add(
  File "/usr/lib/calibre/calibre/db/cli/cmd_add.py", line 268, in do_add
    book_title, ids, mids, dups = dbctx.run(
  File "/usr/lib/calibre/calibre/db/cli/main.py", line 183, in run
    return m.implementation(self.db.new_api, None, *args)
  File "/usr/lib/calibre/calibre/db/cli/cmd_add.py", line 180, in implementation
    return func(db, notify_changes, is_remote, args)
  File "/usr/lib/calibre/calibre/db/cli/cmd_add.py", line 172, in format_group
    added_ids, updated_ids, duplicates = do_adding(
  File "/usr/lib/calibre/calibre/db/cli/cmd_add.py", line 63, in do_adding
    identical_book_list = find_identical_books(mi, identical_books_data)
  File "/usr/lib/calibre/calibre/db/utils.py", line 68, in find_identical_books
    author_ids = author_map.get(icu_lower(a))
  File "/usr/lib/calibre/calibre/utils/icu.py", line 191, in change_case
    return _icu.change_case(x, which, _locale)
TypeError: Not a unicode string
First of all, "Ian Flemming" looks very unicode-y to me. Second of all, I would like to have information about particular file which causes an error. Third of all, I would like to solve this issue

If there is a way to turn on some debug/verbose logging for calibredb add —*that would be cool.

I do this all on my server, so I can't use desktop calibreversion. That's why I'm trying to setup calibre-web + calibredb

Any ideas how can I fix it?
asm0dey is offline   Reply With Quote
Old 05-20-2022, 02:28 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,341
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
use the official calibre binaries rather than your distro package and you will be fine
kovidgoyal is offline   Reply With Quote
Advert
Old 05-20-2022, 03:07 AM   #3
asm0dey
Junior Member
asm0dey began at the beginning.
 
asm0dey's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2022
Device: Pocketbook 302
Quote:
Originally Posted by kovidgoyal View Post
use the official calibre binaries rather than your distro package and you will be fine
Thanks, will try! My library is of enormous size like 600k books, so may take some time.
asm0dey is offline   Reply With Quote
Old 05-20-2022, 03:28 AM   #4
asm0dey
Junior Member
asm0dey began at the beginning.
 
asm0dey's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2022
Device: Pocketbook 302
Quote:
Originally Posted by kovidgoyal View Post
use the official calibre binaries rather than your distro package and you will be fine
Nop, sorry to say this, but this time error looks like this:

Code:
Traceback (most recent call last):
  File "runpy.py", line 194, in _run_module_as_main
  File "runpy.py", line 87, in _run_code
  File "site.py", line 45, in <module>
  File "site.py", line 41, in main
  File "calibre/db/cli/main.py", line 250, in main
  File "calibre/db/cli/main.py", line 40, in run_cmd
  File "calibre/db/cli/cmd_add.py", line 474, in main
  File "calibre/db/cli/cmd_add.py", line 268, in do_add
  File "calibre/db/cli/main.py", line 183, in run
  File "calibre/db/cli/cmd_add.py", line 180, in implementation
  File "calibre/db/cli/cmd_add.py", line 172, in format_group
  File "calibre/db/cli/cmd_add.py", line 63, in do_adding
  File "calibre/db/utils.py", line 68, in find_identical_books
  File "calibre/utils/icu.py", line 191, in change_case
TypeError: Not a unicode string
asm0dey is offline   Reply With Quote
Old 05-20-2022, 09:41 AM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by asm0dey View Post
Thanks, will try! My library is of enormous size like 600k books, so may take some time.
No need to re-import.
Just uninstall the distro version, then use the official (command line) site.

It will find your existing Library (because that is in the settings) and proceed from there.
theducks is offline   Reply With Quote
Advert
Old 05-20-2022, 11:40 AM   #6
asm0dey
Junior Member
asm0dey began at the beginning.
 
asm0dey's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2022
Device: Pocketbook 302
Quote:
Originally Posted by theducks View Post
No need to re-import.
Just uninstall the distro version, then use the official (command line) site.

It will find your existing Library (because that is in the settings) and proceed from there.
Exactly what I did. New error is above (looks almost the same)
asm0dey is offline   Reply With Quote
Old 05-20-2022, 03:36 PM   #7
asm0dey
Junior Member
asm0dey began at the beginning.
 
asm0dey's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2022
Device: Pocketbook 302
If there is any way to debug —*I am willing to help. Debug builds, extended logging — anything. Just let me know.

A bit more context: books are in fb2 format.
asm0dey is offline   Reply With Quote
Old 05-20-2022, 08:35 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,341
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah this will be a bug in fb2 metadata reader plugin not generating unicode author names. The workaround is here: https://github.com/kovidgoyal/calibr...198e3830f79586
kovidgoyal is offline   Reply With Quote
Old 05-21-2022, 05:48 AM   #9
asm0dey
Junior Member
asm0dey began at the beginning.
 
asm0dey's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2022
Device: Pocketbook 302
Quote:
Originally Posted by kovidgoyal View Post
Ah this will be a bug in fb2 metadata reader plugin not generating unicode author names. The workaround is here: https://github.com/kovidgoyal/calibr...198e3830f79586
Awesome! It's there any way to get a nightly build with this fix included or the only way is to build it myself?
asm0dey is offline   Reply With Quote
Old 05-21-2022, 05:51 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,341
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You dont need to build: https://manual.calibre-ebook.com/develop.html
kovidgoyal is offline   Reply With Quote
Old 05-21-2022, 06:25 AM   #11
asm0dey
Junior Member
asm0dey began at the beginning.
 
asm0dey's Avatar
 
Posts: 8
Karma: 10
Join Date: May 2022
Device: Pocketbook 302
Quote:
Originally Posted by kovidgoyal View Post
Instelled dev version, can confirm that the fix works, thank you!
asm0dey is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibredb add questions jindroush Related Tools 7 01-31-2018 12:10 AM
Add Series to Title in CalibreDB? phossler Calibre 4 01-27-2015 09:19 AM
calibredb add problem jmwatte Calibre 6 10-17-2014 02:30 AM
cannot add book to calibredb using CLI bump Calibre 2 04-04-2014 01:33 AM
calibredb add -- how to add additional metadata? TuxGirl Calibre 16 12-29-2011 01:01 AM


All times are GMT -4. The time now is 06:39 AM.


MobileRead.com is a privately owned, operated and funded community.