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 04-25-2015, 02:36 AM   #1
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Error in Book Details

Hi.

I tried moving my columns around in Book details, and when I went to Apply, I got the following error:

Quote:
calibre, version 2.25.0
ERROR: Unhandled exception: <b>TypeError</b>:sequence item 0: expected string or Unicode, NoneType found

calibre 2.25 isfrozen: True is64bit: False
Windows-7-6.1.7601-SP1 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '7', '6.1.7601')
Python 2.7.9
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Successfully initialized third party plugins: Generate Cover && Manage Series && Wiki Reader && FanFicFare && EpubMerge && Quality Check && Read MP3 AudioBook metadata && User Category && Reading List && Modify ePub && Find Duplicates
Traceback (most recent call last):
File "site-packages\calibre\gui2\preferences\main.py", line 393, in accept
File "site-packages\calibre\gui2\preferences\main.py", line 354, in commit
File "site-packages\calibre\gui2\preferences\look_feel.py", line 461, in commit
File "site-packages\calibre\gui2\preferences\coloring.py", line 1039, in commit
File "site-packages\calibre\gui2\preferences\coloring.py", line 744, in commit
File "site-packages\calibre\library\coloring.py", line 60, in template
TypeError: sequence item 0: expected string or Unicode, NoneType found
Can anyone help?
Tanjamuse is offline   Reply With Quote
Old 04-25-2015, 05:18 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,415
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
You are in the same situation we discussed some time back. You have changed the type of a custom column by deleting it then re-adding it with the same name. That custom column has icon or coloring rules that are no longer valid.
chaley is offline   Reply With Quote
Advert
Old 04-25-2015, 05:25 AM   #3
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Thank you.
Tanjamuse is offline   Reply With Quote
Old 04-25-2015, 06:20 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,706
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@chaley - how about an option (--rules) be added to the calibredb custom_columns command to list columns used as colour/icon target, or a within a colour/icon rule?

BR
BetterRed is offline   Reply With Quote
Old 04-26-2015, 05:55 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,415
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
@chaley - how about an option (--rules) be added to the calibredb custom_columns command to list columns used as colour/icon target, or a within a colour/icon rule?

BR
Such a thing is possible, albeit difficult because of advanced rules. However, I am not sure what problem it would solve. What you would get is a list of columns, not the contexts (rule/condition) in which they are evaluated. You can see this in an easier-to-view setting (again, ignoring advanced rules) in the various preferences screens. You can see the complete underlying template in metadata_db_prefs_backup.json. And unfortunately none of these solve Tanjamuse's problem: what rules were made invalid by the type change.

The problem arises when the column behind a lookup key changes type, something that can happen only when a column is deleted then a new column with a different type but with the same lookup key is added. In most cases, when this happens any rule with a condition making reference to that column must change because the semantics of the conditions change. Having the column names doesn't tell the user enough about that problem to find the offending conditions.

I have submitted a change to Kovid to show invalid conditions in the preferences rules display panels, making it easier to find rules that use columns that changed types. This along with a change Kovid made to prevent tossing exceptions when invalid rules are encountered should permit the user to find and fix problems without encountering calibre misbehavior.
chaley is offline   Reply With Quote
Advert
Old 04-26-2015, 08:01 AM   #6
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
I know it doesn't directly have anything to do with this, but would it be possible to create a "remove several" feature, instead of having to remove the icon rules one by one?
Tanjamuse is offline   Reply With Quote
Old 04-26-2015, 10:59 AM   #7
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,020
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 chaley View Post
You are in the same situation we discussed some time back. You have changed the type of a custom column by deleting it then re-adding it with the same name. That custom column has icon or coloring rules that are no longer valid.
I use Eudora 7. When I make a change to a 'mailbox' folder, it checks the Filter Rules and offers solution suggestions.
Delete is simple. The rule goes into
Rename: updates the rule or Delete

Since there is not an equivalent of 'Type', you could offer to Archive as TXT & Remove the rule. Letting the user later paste the old rule and fix the (type) errors.
theducks is offline   Reply With Quote
Old 04-26-2015, 11:18 AM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,415
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@theducks: thanks for the suggestions. I spent some hours over the last few days looking at similar ideas, but ran into too many problems. One can delete and add custom columns using the CLI, where popping up random questions is not usually appreciated. In the GUI, columns aren't actually deleted until calibre exits, where we no longer have the option of asking the user any questions. There isn't anyplace one could "paste" an archived rule. Some conditions such as "is set" can survive a type change so deleting the rules halfway through the delete/add process can be suboptimal.. And so on.

Of course all of these problems could be fixed, but it is more work than I am willing to do for a problem that is so rare. I think the solution I submitted plus Kovid's change take us far enough.
chaley is offline   Reply With Quote
Old 04-26-2015, 12:02 PM   #9
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,020
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 chaley View Post
@theducks: There isn't anyplace one could "paste" an archived rule.
(I mostly use Column color rules and those were done a long time ago)
theducks is offline   Reply With Quote
Old 04-26-2015, 02:51 PM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,415
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Tanjamuse View Post
I know it doesn't directly have anything to do with this, but would it be possible to create a "remove several" feature, instead of having to remove the icon rules one by one?
Kovid accepted the change. It is in source now and will be in the next calibre release.
chaley is offline   Reply With Quote
Old 04-26-2015, 02:59 PM   #11
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Thanks
Tanjamuse is offline   Reply With Quote
Old 04-26-2015, 04:13 PM   #12
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,706
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
I have submitted a change to Kovid to show invalid conditions in the preferences rules display panels, making it easier to find rules that use columns that changed types. This along with a change Kovid made to prevent tossing exceptions when invalid rules are encountered should permit the user to find and fix problems without encountering calibre misbehavior.
@chaley -

I anticipated adding a --rules option to calibredb custom_columns would be non-trivial. But I always ask these things, to not ask would be underestimate the ingenuity of yourself and Kovid

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dragging a book over the Book Details window Ripplinger Calibre 18 07-18-2013 01:19 PM
Book details under book list - not on the right side ILB Library Management 3 06-22-2013 03:46 PM
Show book details error firewolf Calibre 3 07-27-2011 02:09 PM
Problem converting LRF -> EPUB (Error Details included) irishtexmex Calibre 0 08-04-2010 05:08 PM
Error moving book details to a new location... GeoffC Calibre 2 08-20-2009 03:14 AM


All times are GMT -4. The time now is 08:58 PM.


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