Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-12-2021, 05:20 PM   #1
kaisersozee
Junior Member
kaisersozee began at the beginning.
 
kaisersozee's Avatar
 
Posts: 9
Karma: 10
Join Date: Jul 2021
Location: Romania
Device: none
KeyError: 'user_categories' - please help

Getting this error - any ideas please....

calibre, version 5.22.1
ERROR: Unhandled exception: <b>KeyError</b>:'user_categories'

calibre 5.22.1 embedded-python: True is64bit: False
Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: EpubMerge (2, 11, 0) && EpubSplit (3, 0, 0) && Fantastic Fiction (1, 4, 0) && Find Duplicates (1, 6, 3) && Goodreads (1, 5, 1)
Traceback (most recent call last):
File "calibre\gui2\add.py", line 516, in process_duplicate
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre\db\backend.py", line 112, in __getitem__
KeyError: 'user_categories'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre\gui2\library\models.py", line 583, in current_changed
File "calibre\gui2\library\models.py", line 566, in get_book_display_info
File "calibre\db\legacy.py", line 696, in get_metadata
File "calibre\db\cache.py", line 687, in get_metadata
File "calibre\db\cache.py", line 372, in _get_metadata
File "calibre\db\backend.py", line 114, in __getitem__
KeyError: 'user_categories'
kaisersozee is offline   Reply With Quote
Old 07-12-2021, 10:42 PM   #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: 39,425
Karma: 17300156
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That looks like something has deleted the user_categories preference from the calibre database. Running the following will fix it:

Code:
calibre-debug -c "from calibre.library import db; db = db().new_api; db.set_pref('user_categories', {})"
kovidgoyal is online now   Reply With Quote
Advert
Old 07-21-2021, 12:36 PM   #3
kaisersozee
Junior Member
kaisersozee began at the beginning.
 
kaisersozee's Avatar
 
Posts: 9
Karma: 10
Join Date: Jul 2021
Location: Romania
Device: none
how do I run it?

Sorry, how do I run it?

Quote:
Originally Posted by kovidgoyal View Post
That looks like something has deleted the user_categories preference from the calibre database. Running the following will fix it:

Code:
calibre-debug -c "from calibre.library import db; db = db().new_api; db.set_pref('user_categories', {})"
kaisersozee is offline   Reply With Quote
Old 07-21-2021, 04:06 PM   #4
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: 26,399
Karma: 41365369
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by kaisersozee View Post
Sorry, how do I run it?
Windows RUN or from a command prompt
theducks is offline   Reply With Quote
Old 07-21-2021, 09:47 PM   #5
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: 39,425
Karma: 17300156
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
open the command prompt application and copy paste the command and press enter.
kovidgoyal is online now   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KeyError: u'format_group' sws Server 4 06-10-2020 03:57 AM
KeyError: u'MimeType' Geremia Calibre 3 02-03-2017 09:39 AM
KeyError: u'kind' senhal Calibre 2 06-19-2016 03:37 PM
KeyError:u'set_to_default' phossler Editor 8 11-28-2014 09:43 PM
KeyError when changing libraries macnab69 Library Management 5 06-29-2013 11:18 AM


All times are GMT -4. The time now is 10:21 PM.


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