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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2013, 05:05 PM   #16
BetterRed
null operator
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: 9,184
Karma: 7797387
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Thumbs down

Well not quite perfect, when I switched from my Test Library back to my Main library after doing the test I got several of the following errors (about 8 I think)

Code:
calibre, version 1.17.0
ERROR: Unhandled exception: <b>AttributeError</b>:'NoneType' object has no attribute 'split'

calibre 1.17 [64bit]  isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Traceback (most recent call last):
  File "calibre_plugins.prince_pdf.main", line 101, in update_info
AttributeError: 'NoneType' object has no attribute 'split'
  • Calibre starts with my Main library, so it was current when I saw the new version notification in the status line
  • I switched to my Test library and updated the plug by clicking on the notification
  • I did my tests
  • Then switched back to my main library and got those errors
So I reinstalled the earlier version and repeated the above - but this time I updated the PI first - i.e. before I switched to the Test library. But I still got the errors when I switched back to Main

And when I switch from Main back to Test I get series of these errors

Code:
calibre, version 1.17.0
ERROR: Unhandled exception: <b>AttributeError</b>:'LibraryDatabase' object has no attribute 'new_api'

calibre 1.17 [64bit]  isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Traceback (most recent call last):
  File "calibre_plugins.prince_pdf.main", line 101, in update_info
  File "site-packages\calibre\db\legacy.py", line 556, in formats
AttributeError: 'LibraryDatabase' object has no attribute 'new_api'
Its a problem specific to this PI, because I repeated the exercise with the ePUBSplit (ie updating to a new version) and did not get the problems, and if I remove the Prince PDF PI I don't get the problems.

I think you should be able to replicate this problem in Linux, but you'll need more than one library.

BR
BetterRed is offline   Reply With Quote
Advert
Old 12-29-2013, 04:17 AM   #17
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,073
Karma: 9567891
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by BetterRed View Post
Code:
File "calibre_plugins.prince_pdf.main", line 101, in update_info
AttributeError: 'NoneType' object has no attribute 'split'
Does that happen when you select a book with no format?

Quote:
Code:
File "site-packages\calibre\db\legacy.py", line 556, in formats
AttributeError: 'LibraryDatabase' object has no attribute 'new_api'
Is this library using the old database backend?

Quote:
I think you should be able to replicate this problem in Linux, but you'll need more than one library.
I'll try. Thank you for the report.
Jellby is offline   Reply With Quote
Old 12-29-2013, 04:54 AM   #18
BetterRed
null operator
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: 9,184
Karma: 7797387
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Jellby View Post
Does that happen when you select a book with no format?.
Yep, I have 7 empty books in my main library and 1 in my test library - ergo I get the messages eight times - I dont have to hit the Prince PDF button to get the error. My guess is that a library switch has the db backend 'selecting' every book in the library - ie enumerating the book list.

Quote:
Originally Posted by Jellby View Post
Is this library using the old database backend?
The libraries were created with 0.8.?? when the 'old database backend' was extant.

However, I'm running 1.17. My understanding is that this means I'm using the 'new database backend' - but I could be wrong. Maybe someone can poke their oar in and confirm or correct that assertion.

Added : if I don't use the Prince PDF plugin, I done get any errors...

Cheers BR

Last edited by BetterRed; 12-29-2013 at 05:12 AM.
BetterRed is offline   Reply With Quote
Old 12-29-2013, 05:21 AM   #19
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,073
Karma: 9567891
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
This should fix the first error and some of the annoying error messages with the plugin closed. The second problem I cannot reproduce, I tried setting the old backend, as indicated here, but I didn't get that message. Hopefully it will go away with the other fix, otherwise maybe you can send me your test library (and settings), or someone else can help.

As far as I can see, that's an internal problem of calibre, maybe triggered by something wrong in the plugin, but it's happening in legacy.py, line 556


Edit: Ah... yes, I can reproduce the error when switching libraries with the plugin window open. I guess that's because I'm not updating the "db" attribute after library change.

Last edited by Jellby; 12-29-2013 at 06:52 AM.
Jellby is offline   Reply With Quote
Old 12-29-2013, 06:51 AM   #20
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,073
Karma: 9567891
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I think both issues are fixed in version 1.1.1
Jellby is offline   Reply With Quote
Advert
Old 12-29-2013, 06:47 PM   #21
BetterRed
null operator
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: 9,184
Karma: 7797387
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Thumbs up

Quote:
Originally Posted by Jellby View Post
I think both issues are fixed in version 1.1.1
So do I

BR
BetterRed is offline   Reply With Quote
Old 01-09-2014, 05:46 PM   #22
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,766
Karma: 54886904
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by BetterRed View Post
Aaah that's better

Assuming Prince is installed in the default location, the cli program will be at

64bit Windows ==>> "C:\Program Files (x86)\Prince\Engine\bin\prince.exe"
32bit Windows ==>> "C:\Program Files\Prince\Engine\bin\prince.exe"

The conversion works - a PDF is produced in the right place and the database is updated to 'say so' and I can open the book (in my PDF reader) via the View feature in calibre

However, when the update is finished the Formats 'column' in Book Details doesn't show a PDF. The Book Details panel probably needs to be refreshed, if I make another book current and return to book just converted the PDF is shown.

I'm not bothered by the missing icons - but other PI's have their icons in the their images folder, that folder is empty in the Prince PDF.zip.

I'm still seeing the aberrant second item in my taskbar. I've got a heavily tweaked taskbar so when I've done my morning chores I'll turn the tweaks off and have another look. It's most unlikely that the tweaks are the cause the of the aberration, but their lack may make it easier to diagnose.

BR
Howdy:

Not to be thick, but I thought I'd give this plugin a shot to address a request from a client, and the plug-in can't find Prince or prince.exe at the Win7 dir address. I don't see the option to address the location of the executable. As someone not really familiar with using Calibre, (nor do I see any plug-in documentation?), can someone tell me where I can tell the plug-in/Calibre that it's a 64-bit Win install? Like BetterRed, mine are in the x86 dir.

Thx in advance,
Hitch
Hitch is offline   Reply With Quote
Old 01-09-2014, 06:20 PM   #23
BetterRed
null operator
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: 9,184
Karma: 7797387
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Hitch View Post
Howdy:

Not to be thick, but I thought I'd give this plugin a shot to address a request from a client, and the plug-in can't find Prince or prince.exe at the Win7 dir address. I don't see the option to address the location of the executable. As someone not really familiar with using Calibre, (nor do I see any plug-in documentation?), can someone tell me where I can tell the plug-in/Calibre that it's a 64-bit Win install? Like BetterRed, mine are in the x86 dir.

Thx in advance,
Hitch
gDay Hitch

In the config screen at top right there's a Browse button, click it and browse to and select C:\Program Files (x86)\Prince\Engine\bin\prince.exe

You get to the Configuration screen via corresponding button on the first popup you get when you click the the Prince icon in tool bar. There's a bit of spiel behind the Help button

Hope that helps - BR
BetterRed is offline   Reply With Quote
Old 01-09-2014, 07:28 PM   #24
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,766
Karma: 54886904
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by BetterRed View Post
gDay Hitch

In the config screen at top right there's a Browse button, click it and browse to and select C:\Program Files (x86)\Prince\Engine\bin\prince.exe

You get to the Configuration screen via corresponding button on the first popup you get when you click the the Prince icon in tool bar. There's a bit of spiel behind the Help button

Hope that helps - BR


Thanks. NOW I see it. I think I was using the GUI interface inadvertently. Urgh. The plugin, without any tweaking, seems to function (now), and I can see I'll have to learn quite a bit to make it perform a little better. However, spiffy!

Hitch
Hitch is offline   Reply With Quote
Old 01-09-2014, 09:45 PM   #25
BetterRed
null operator
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: 9,184
Karma: 7797387
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Hitch View Post


Thanks. NOW I see it. I think I was using the GUI interface inadvertently.
I fell down the same rabbit hole

Quote:
Originally Posted by Hitch View Post
Urgh. The plugin, without any tweaking, seems to function (now), and I can see I'll have to learn quite a bit to make it perform a little better. However, spiffy!Hitch
If your client isn't a calibre user then maybe they can just use the Prince GUI program, or the command line program (which is what the PI and I assume the GUI rabbit hole invoke)

BR
BetterRed is offline   Reply With Quote
Old 01-10-2014, 10:06 AM   #26
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,073
Karma: 9567891
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by BetterRed View Post
You get to the Configuration screen via corresponding button on the first popup you get when you click the the Prince icon in tool bar.
And from Preferences -> Plugins, select the plugin and click the "configure this plugin" (or whatever it's called) button.

Quote:
There's a bit of spiel behind the Help button
Further help, not about the plugin itself, but about what the plugin is supposed to do, can maybe be found in the script threads linked in the first post of this thread.
Jellby is offline   Reply With Quote
Old 04-29-2014, 11:17 AM   #27
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,166
Karma: 2204557
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

I have been a longtime user of the script version, which stopped running probably due to some Python update. So, it's about time to have a look at the plug-in version which looks very handy.

I used two different scripts to produce two PDF formats, a 9x12cm and a IPAD one. Maybe the following idea is a technical horror but... Is there a possibility of installing two plugins, under different names, each one dedicated to its own format? I promise, I would only use one at a time.

If this is not possible, what would be the easiest way to produce two different formats?

Last edited by roger64; 04-29-2014 at 11:21 AM.
roger64 is offline   Reply With Quote
Old 04-29-2014, 11:24 AM   #28
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,073
Karma: 9567891
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Hmm... Didn't think of that... The only difference between the two scripts is the default stylesheet added, right? I guess I could try to add the possibility of saving different presets, and then select which one to use for each conversion. Since I'm not an expert in either GUI programming or python, this can take me some time.

What you could do now is saving the different stylesheets elsewhere and copy-paste them before doing the conversion. Not very user-friendly, though.
Jellby is offline   Reply With Quote
Old 04-29-2014, 11:41 AM   #29
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,166
Karma: 2204557
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Thanks for your reply. I know for a long time that I give you trouble.

BTW, the first try was nearly perfect (LMDE - 64 bits). Only the SVG cover (a wrapper made by Calibre) displayed vertical stripes of white, one at the top and the other down. But I'll probably find the solution using part of the former code and adding some !important as you teached me. (OK now, using the other script)

Yes the scripts are of course the same and only differ by the stylesheet. I'll have to use Copy/Paste in the meantime.

Last edited by roger64; 04-29-2014 at 12:07 PM.
roger64 is offline   Reply With Quote
Old 05-12-2014, 05:33 PM   #30
Fonti
Junior Member
Fonti began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2014
Device: none
Thank you Jellby for your plugin! It works very well.

Is there a place to download different stylesheets for the conversion to PDF? For example, I like roger64's IPAD-version, but don't have the skills to make my own.
Fonti is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] EpubMerge JimmXinu Plugins 302 10-01-2017 11:21 AM
[GUI Plugin] Ex Libris AlPe Plugins 75 09-13-2017 05:28 PM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 403 07-29-2017 02:19 PM
[GUI Plugin] Wordpress frescogamba Plugins 11 04-06-2015 10:09 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 05:55 PM.


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