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 02-12-2016, 10:11 AM   #871
edmun
Junior Member
edmun began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2016
Device: Kindle
Hi Guys

I am sorry to trouble you but this will be probably the first time I am having an issues with CountPages plugin.

I have recently added several books to the newest version of Calibre (2.51), selected 5 books, clicked on Count Pages and accepted to update the columns. 4 books have been updated but one hasn't. I have tried several times but it does not update one book (source - mobi/epub):

Code:
Count Page/Word Statistics
-------------------------------
Logfile for book ID 563 (Przewieszenie)
563
Traceback (most recent call last):
  File "calibre_plugins.count_pages.jobs", line 141, in do_statistics_for_book
  File "calibre_plugins.count_pages.statistics", line 53, in get_page_count
  File "calibre_plugins.count_pages.statistics", line 88, in _open_epub_file
  File "site-packages\calibre\ebooks\oeb\iterator\book.py", line 140, in __enter__
  File "site-packages\calibre\ebooks\oeb\iterator\book.py", line 84, in run_extract_book
  File "site-packages\calibre\utils\ipc\simple_worker.py", line 220, in fork_job
  File "site-packages\calibre\utils\ipc\simple_worker.py", line 116, in communicate
WorkerError: Worker failed

edit: no way - found it while I was writing the post. What has brought my attention is that countpages started with counting with epub file (I have purchased book in both formats). Probably epub file is corrupted but mobi is fine.
edmun is offline   Reply With Quote
Old 05-15-2016, 03:05 PM   #872
mariaclaudia
Zealot
mariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of lightmariaclaudia is a glorious beacon of light
 
Posts: 149
Karma: 12316
Join Date: Jul 2014
Device: none
Good afternoon. Sorry if this question is repeated, but English is not my forte, so if somebody asked the same before, it's sure I have not seen. Is it possible that the plugin run automatically each time you add one or more books?

Best regards from Lima, Perú
Blessings
mariaclaudia is offline   Reply With Quote
Advert
Old 05-15-2016, 03:25 PM   #873
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: 29,782
Karma: 54830978
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 mariaclaudia View Post
Good afternoon. Sorry if this question is repeated, but English is not my forte, so if somebody asked the same before, it's sure I have not seen. Is it possible that the plugin run automatically each time you add one or more books?

Best regards from Lima, Perú
Blessings
No

most Plugins are not able to be inside the Add Books pipeline. to much data has yet to be inserted into the Library.
Cart, but the horse has yet to be captured


You CAN TAG books during the Add.
Preferences: Adding Books: Tag to apply... <your tag>
theducks is offline   Reply With Quote
Old 05-17-2016, 07:28 PM   #874
whismerhill
Connoisseur
whismerhill began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
what's the best algorithm for a kindle 4 non touch ?

reason I'm asking is because I was fine just using "apnx accurate"
but I found something strange.
*** a book with 106469 words & 392 pages
calibre viewer EPUB says "641"
& MOBI "622" pages

*** another book with 97 947 words & 1241 pages
calibre viewer EPUB says "2184" thingy (whatever that number is)
& for mobi "569" pages


obviously one of the two is wrong
I don't think the 2nd book has really 1241 pages that would really be a huge pocket book & I don't think it is.

so yeah I like this plugin, but the variance seems a bit too much, any way to make it more "sensible" maybe ?

thanks for reading.


EDIT: nevermind Adobe algorithm seems to be more consistent with the amount of real content sometimes dividing the number of pages by 3
new number of pages for the 1241 pages book is 486

Last edited by whismerhill; 05-17-2016 at 10:29 PM.
whismerhill is offline   Reply With Quote
Old 05-29-2016, 02:03 PM   #875
Pyjam
Zealot
Pyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead community
 
Posts: 143
Karma: 15920
Join Date: Aug 2015
Device: Kindle Voyage
Hello there

I'm lost!

I would like an accurate measure to compare book lengths. I don't expect this measure to match the actual number of pages. Which of the four methods should I choose?

Thanks for your help.
Pyjam is offline   Reply With Quote
Advert
Old 05-29-2016, 02:27 PM   #876
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: 29,782
Karma: 54830978
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 Pyjam View Post
Hello there

I'm lost!

I would like an accurate measure to compare book lengths. I don't expect this measure to match the actual number of pages. Which of the four methods should I choose?

Thanks for your help.
Consistency is probably more important.
Use the same method for all so that comparisons work

I use the ADE (adobe), since that is also my (and many others) reader device base
IIRC one is is Paragraphs

The Calibre viewer... fine for Calibre only uses
theducks is offline   Reply With Quote
Old 05-30-2016, 07:03 AM   #877
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,759
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
Quote:
Originally Posted by Pyjam View Post
Hello there

I'm lost!

I would like an accurate measure to compare book lengths. I don't expect this measure to match the actual number of pages. Which of the four methods should I choose?

Thanks for your help.
If you just want numbers for comparison then I would recommend using word count instead of pages.

Sent from my SM-G925I
Dopedangel is offline   Reply With Quote
Old 05-30-2016, 10:22 AM   #878
Pyjam
Zealot
Pyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead community
 
Posts: 143
Karma: 15920
Join Date: Aug 2015
Device: Kindle Voyage
After many tests, I think I'm satisfied with the custom 1800 chars per page method. The result is often close to the mass market edition, or to the number of pages given by my Kindle.

Hyphenation has a weird effect on the result. After I hypenated a 1860-page long book it has lost 120 pages. OTOH a 1000-pages long book has gained almost 50 pages.
Pyjam is offline   Reply With Quote
Old 05-31-2016, 12:12 PM   #879
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: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You should count the pages before adding in soft hyphens.
JSWolf is offline   Reply With Quote
Old 06-01-2016, 05:59 AM   #880
Pyjam
Zealot
Pyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead communityPyjam has become a pillar of the MobileRead community
 
Posts: 143
Karma: 15920
Join Date: Aug 2015
Device: Kindle Voyage
Indeed.

Most of the time, an evaluation with 1765 chars per page on an EPUB w/o hephen is very close to the number of pages of an AZW3 after hyphenation, with an accuracy of 98%. Really strange.
Pyjam is offline   Reply With Quote
Old 06-27-2016, 11:42 AM   #881
excaliber
Connoisseur
excaliber began at the beginning.
 
excaliber's Avatar
 
Posts: 59
Karma: 10
Join Date: Nov 2013
Device: Samsung Galaxy Tab 2 10.1 P5110
Hi all,

When I use this plugin I'm getting some times following error:

calibre, version 2.60.0
ERROR: Unhandled exception: <b>TypeError</b>bject of type 'NoneType' has no len()

calibre 2.60 embedded-python: True is64bit: True
Linux-4.4.0-22-generic-x86_64-with-debian-jessie-sid Linux ('64bit', 'ELF')
('Linux', '4.4.0-22-generic', '#40~14.04.1-Ubuntu SMP Fri May 13 17:27:45 UTC 2016')
Python 2.7.9
Linux: ('debian', 'jessie/sid', '')
Successfully initialized third party plugins: Save To Format (0, 0, 6) && Walk Search History (1, 3, 1) && Count Pages (1, 6, 9) && Wiki Reader (2, 1, 0) && Open With (1, 5, 9) && Get DJVU Metadata (1, 2, 0) && Author Book Count Hierarchy (1, 1, 6) && Favourites Menu (1, 0, 4) && Generate Cover (1, 5, 19) && Consolidate All Library Metadata (2, 0, 19) && Search The Internet (1, 7, 6) && Reading List (1, 6, 6) && Find Duplicates (1, 6, 2) && Zotero Metadata Importer (1, 0, 7) && Astro-ph (1, 1, 0) && English Noun Frequency (1, 0, 6) && Import List (1, 1, 5) && Clean Metadata (0, 0, 6) && Library Codes (1, 0, 27) && Job Spy (1, 0, 50) && Manage Series (1, 2, 8) && Google Scholar (0, 1, 1) && Annotations (1, 4, 7) && MultiColumnSearch (1, 0, 64) && User Category (1, 5, 3) && Quick Preferences (1, 4, 1) && Diaps Editing Toolbag (0, 3, 1) && Quality Check (1, 9, 11) && View Manager (1, 3, 2) && Goodreads (1, 1, 11) && Extract ISBN (1, 4, 4) && BOL_DE (0, 7, 2) && Drop Search Results (1, 0, 5) && Author Book Count (2, 1, 4) && Recoll Full Text Search (1, 0, 1) && Get PDF Metadata (1, 2, 0)
Traceback (most recent call last):
File "site-packages/calibre/gui2/__init__.py", line 418, in dispatch
File "calibre_plugins.count_pages.action", line 211, in _get_statistics_completed
TypeError: object of type 'NoneType' has no len()


I run the plugin for some hundred files. It starts normally but when it reaches 100% is throwing out the above error without updating the pages column and I cannot figure out if it's because of a particular file and if so which file is causing it.

Any ideas?
excaliber is offline   Reply With Quote
Old 06-28-2016, 01:39 AM   #882
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by excaliber View Post
Hi all,
I run the plugin for some hundred files. It starts normally but when it reaches 100% is throwing out the above error without updating the pages column and I cannot figure out if it's because of a particular file and if so which file is causing it.

Any ideas?
Just to check: you are selecting a hundred or more books and running the count. Then the error happens at the end?

From the code, the only way to get that error is if there was an earlier error. When it happens again, can you open the job window, find the count pages job in the list, select it and press the "Show job details" button. Then copy the text and post post it. Hopefully that will show the original error.
davidfor is offline   Reply With Quote
Old 06-28-2016, 03:18 AM   #883
excaliber
Connoisseur
excaliber began at the beginning.
 
excaliber's Avatar
 
Posts: 59
Karma: 10
Join Date: Nov 2013
Device: Samsung Galaxy Tab 2 10.1 P5110
@davidfor:
Thanks for your response!

Just to check: you are selecting a hundred or more books and running the count. Then the error happens at the end?
Yes.

From the code, the only way to get that error is if there was an earlier error. When it happens again, can you open the job window, find the count pages job in the list, select it and press the "Show job details" button. Then copy the text and post post it. Hopefully that will show the original error.
OK. I'm running another count pages job now. It will take some days to finish...
I think the reason is that I'm running out of space in my partition when the plugin puts files in the /tmp folder. I have now changed the path for it in a new bigger partition. I will report the result when the job has finished.
excaliber is offline   Reply With Quote
Old 06-28-2016, 08:14 AM   #884
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by excaliber View Post
@davidfor:
Thanks for your response!

Just to check: you are selecting a hundred or more books and running the count. Then the error happens at the end?
Yes.

From the code, the only way to get that error is if there was an earlier error. When it happens again, can you open the job window, find the count pages job in the list, select it and press the "Show job details" button. Then copy the text and post post it. Hopefully that will show the original error.
OK. I'm running another count pages job now. It will take some days to finish...
Days? Exactly how many books are you counting?
Quote:
I think the reason is that I'm running out of space in my partition when the plugin puts files in the /tmp folder. I have now changed the path for it in a new bigger partition. I will report the result when the job has finished.
Yes, running out of space could do it. So might running out of memory if you are running that many in one go.
davidfor is offline   Reply With Quote
Old 06-28-2016, 09:49 AM   #885
excaliber
Connoisseur
excaliber began at the beginning.
 
excaliber's Avatar
 
Posts: 59
Karma: 10
Join Date: Nov 2013
Device: Samsung Galaxy Tab 2 10.1 P5110
@davidfor:
Days? Exactly how many books are you counting?
Around 15'000 documents. But most of them are not books. I was throwing into Calibre every document I had and now is a mess...That's why I use the plugin now. It helps me to to sort my documents.
excaliber is offline   Reply With Quote
Reply

Tags
count, count pages, page count, pages, plugin


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1184 04-17-2024 06:17 PM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[GUI Plugin] Quick Preferences kiwidude Plugins 62 03-16-2024 11:47 PM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 12:02 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 07:00 PM.


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