Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 10-15-2017, 04:07 PM   #241
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by BetterRed View Post
As I understand Terisa's latest post - the 'beta' version she attached will store the plugin preferences (the columns names) in a plugin specific json file in the configuration folder rather than the preferences table in the database - which means GFN will have no need to access the in-memory database.

BR
Aside of the places where it's allowed (as any other plugin), at postadd, when no copy is necessary.
Terisa de morgan is offline   Reply With Quote
Old 10-15-2017, 05:00 PM   #242
Immelmann67
Member
Immelmann67 began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Feb 2014
Device: Kindle
Quote:
Originally Posted by Terisa de morgan View Post
This is a beta option that:
  • stores preference in json file (through library name, as getting library id is only for calibre 3)
  • allegedly get the preferences changes without restart

As there is no database copy, I hope @Immelmann67 is solved. If I have no comments, I'll make it release version on Wednesday.
Hi Terisa,

Thank you for trying to fix the problem- I downloaded and installed the new version (0.0.13), restarted (as suggested by BR), and attempted to configure the plugin.
After a few seconds, I got the following error:
calibre, version 3.9.0
ERROR: Unhandled exception: <b>MemoryError</b>:

calibre 3.9 Portable embedded-python: 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.12+
Windows: ('7', '6.1.7601', 'SP1', u'Multiprocessor Free')
Interface language: en_GB
Successfully initialized third party plugins: Save To Format (0, 0, 6) && Clean Metadata (0, 0, 6) && Generate Cover (1, 5, 21) && KindleUnpack - The Plugin (0, 81, 5) && Audit Log (1, 0, 8) && Embed Comic Metadata (1, 3, 8) && Reading List (1, 6, 6) && Fantastic Fiction Adults (1, 0, 4) && Similar Stories (1, 0, 58) && Fantastic Fiction (1, 2, 0) && Quick Preferences (1, 4, 1) && Open With (1, 5, 10) && Goodreads (1, 1, 12) && Favourites Menu (1, 0, 4) && GetFileName (0, 0, 13) && Extract ISBN (1, 4, 4) && Job Spy (1, 0, 80) && FictionDB (1, 0, 10) && Kindle Collections (1, 7, 17) && Count Pages (1, 8, 0) && Manage Series (1, 2, 8) && Find Duplicates (1, 6, 3) && BOL_DE (0, 7, 5) && BOL_NL (3, 8, 16) && User Category (1, 5, 3) && Modify ePub (1, 3, 13) && Resize Cover (1, 0, 2) && Quality Check (1, 9, 11) && Barnes & Noble (1, 2, 14) && View Manager (1, 4, 3)
Traceback (most recent call last):
File "site-packages\calibre\gui2\dialogs\plugin_updater.py", line 804, in _configure_clicked
File "site-packages\calibre\customize\__init__.py", line 155, in do_user_config
File "calibre_plugins.getfilename.__init__", line 298, in config_widget
File "calibre_plugins.getfilename.config", line 153, in __init__
File "site-packages\calibre\library\__init__.py", line 11, in db
File "site-packages\calibre\db\legacy.py", line 83, in __init__
File "site-packages\calibre\db\cache.py", line 354, in init
File "site-packages\calibre\db\backend.py", line 1260, in read_tables
File "site-packages\calibre\db\tables.py", line 110, in read
MemoryError

Which probably means I won't be able to use the plugin.
Thank you again for trying, though.
I67
Immelmann67 is offline   Reply With Quote
Advert
Old 10-15-2017, 05:18 PM   #243
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I'll try to check it, but, at this moment, I'm not aware of any copy. I'll be back if I find something.
Terisa de morgan is offline   Reply With Quote
Old 10-15-2017, 05:19 PM   #244
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Does this only happen with this plugin? Can you configure any other one?
Terisa de morgan is offline   Reply With Quote
Old 10-15-2017, 05:24 PM   #245
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: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Terisa de morgan View Post
If there is no json information for that library, they will be copied from library preferences to json (no removing, they don't hurt).


FYI - for those who don't like clutter, there's a Job Spy tool for removing 'redundant' plugin preferences from a library database.

BR
BetterRed is offline   Reply With Quote
Advert
Old 10-15-2017, 05:43 PM   #246
Immelmann67
Member
Immelmann67 began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Feb 2014
Device: Kindle
Quote:
Originally Posted by Terisa de morgan View Post
Does this only happen with this plugin? Can you configure any other one?
Hi Terisa, this is the only one I'm having problems with!
Immelmann67 is offline   Reply With Quote
Old 10-15-2017, 05:54 PM   #247
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Try the 64-bit version. It would be useful to know if it's Calibre or something else.
JSWolf is offline   Reply With Quote
Old 10-15-2017, 06:03 PM   #248
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: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Immelmann67 View Post
Hi Terisa,

Thank you for trying to fix the problem- I downloaded and installed the new version (0.0.13), restarted (as suggested by BR), and attempted to configure the plugin.
After a few seconds, I got the following error:

Which probably means I won't be able to use the plugin.
Thank you again for trying, though.
@Immelmann67 - I just added the new version of GFN into a fresh portable install, did a restart, configured GFN, and imported some books - no problems.

Try creating a fresh library, then add the columns you want GFN to use, configure GFN, and add a book or two. If that works then it suggests it's something to do with library, probably it's size and 32bit. If you created a 64bit portable as previously suggested and it works then that would be proof positive.

Perhaps a library with 149,000 books, some custom columns, and quite a few plugins is sailing close too the wind for 32 bit, and GFN is the puff that dismasted the good ship lollipop

BR
BetterRed is offline   Reply With Quote
Old 10-16-2017, 12:23 AM   #249
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by Immelmann67 View Post
Hi Terisa,

Thank you for trying to fix the problem- I downloaded and installed the new version (0.0.13), restarted (as suggested by BR), and attempted to configure the plugin.
After a few seconds, I got the following error:
Which probably means I won't be able to use the plugin.
Thank you again for trying, though.
I67
Problem is, that code is for recovering database prefs, if any, and it doesn't make any copy I'm aware of. The code is:

Code:
            from calibre.library import db

            self.prefs = get_library_config(db())
The code is crashing at second line. This is necessary for the use case where there is a possible migration. So, I don't know how to change it.
Terisa de morgan is offline   Reply With Quote
Old 10-16-2017, 12:42 AM   #250
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@Terisa: Not sure why you need to read preferences in the __init__ method. Instead read the preferences in the postadd/post_import callbacks using the provided db object. Calling db() will create a copy of the entire library in memory.
kovidgoyal is offline   Reply With Quote
Old 10-16-2017, 02:52 AM   #251
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by kovidgoyal View Post
@Terisa: Not sure why you need to read preferences in the __init__ method. Instead read the preferences in the postadd/post_import callbacks using the provided db object. Calling db() will create a copy of the entire library in memory.
@Kovid: this call is used for configuring the plugin, so it cannot be at postadd/postimport but when the user requests the configuration. Is there any way that, in the config module, the database can be loaded?
Terisa de morgan is offline   Reply With Quote
Old 10-16-2017, 03:33 AM   #252
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the code I posted earlier, falling back to calling db() when get_gui() returns None (which means you are not in a GUI context).
kovidgoyal is offline   Reply With Quote
Old 10-16-2017, 03:48 AM   #253
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by kovidgoyal View Post
Use the code I posted earlier, falling back to calling db() when get_gui() returns None (which means you are not in a GUI context).
OK, thank you very much, I'll do that. Sorry for my mistakes, but I don't know a lot about calibre code.
Terisa de morgan is offline   Reply With Quote
Old 10-16-2017, 04:11 AM   #254
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No worries, calibre is huge
kovidgoyal is offline   Reply With Quote
Old 10-16-2017, 06:11 AM   #255
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
@Immelmann67, can you check this beta? I've included kovid's solution.
Attached Files
File Type: zip GetFileName_Beta.zip (17.6 KB, 212 views)

Last edited by Terisa de morgan; 10-16-2017 at 06:24 AM.
Terisa de morgan is offline   Reply With Quote
Reply

Tags
calibredb, calibredb metadata import, plugin


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 01:25 AM
How to sort quickly books by filetype? construsol Calibre 7 05-24-2014 06:20 PM
Calibre associated with every filetype?! sej7278 Calibre 14 08-09-2011 10:36 AM
Zip Filetype Plugin? rsingley Plugins 7 02-11-2011 05:11 PM
How to register a filetype? plisken iRex 2 09-28-2009 07:16 AM


All times are GMT -4. The time now is 08:59 AM.


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