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 12-08-2019, 10:46 PM   #1336
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by davidfor View Post
The attached beta version has this change. I haven't checked if it produces the same stats as before. I didn't want to wait for the results. I'll have to reinstall the released version and test it.
For Oscar, your beta was faster than the original but still quite a bit slower than my dictionary hack (orig 26min, yours 7min24sec, mine 37sec) but more importantly it seems to have skewed the stats for the complex word count. The original code was 109300, my hack was 108737, and yours 116847.

As for the code you quoted, I'm far from understanding exactly what you changed! curWord is a list? Or a string that we append to? Totally lost here...
snarkophilus is offline   Reply With Quote
Old 12-09-2019, 02:37 AM   #1337
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by NiLuJe View Post
I'm using completely custom source builds, so it's not specific to the binary releases, at least.
I think that's good as it means you are building it the same way.
Quote:
If you have that on hand, could you point me to the relevant bit of code? Does that rely on the ICU shim built by Calibre?
I think the answer is yes. I assume it is calibre/utils/icu.c, but, haven't looked at this or how it is built properly.
davidfor is offline   Reply With Quote
Advert
Old 12-09-2019, 05:35 PM   #1338
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by snarkophilus View Post
For Oscar, your beta was faster than the original but still quite a bit slower than my dictionary hack (orig 26min, yours 7min24sec, mine 37sec) but more importantly it seems to have skewed the stats for the complex word count. The original code was 109300, my hack was 108737, and yours 116847.

As for the code you quoted, I'm far from understanding exactly what you changed! curWord is a list? Or a string that we append to? Totally lost here...
A bit of stupidity on my part. I was looking at the syllable counting earlier. I mixed up the calls and was thinking this one took a single word. And yes, "curWord" is list. So, my count was wrong. I put it back, but got 137520.

I'll have a look at your version later and work out what the best solution is.
davidfor is offline   Reply With Quote
Old 02-15-2020, 03:22 PM   #1339
asierra
Junior Member
asierra began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2011
Device: kindle
AttributeError: 'dict' object has no attribute 'iteritems'

Hello,

The plugin is not working anymore with current calibre 4.99.4 and I think it is because the plugin still uses python2 instead of python3.

Are you planning to create an updated version?

Thank you.

Alejandro Sierra

calibre, version 4.99.4
ERROR: Unhandled exception: <b>AttributeError</b>:'dict' object has no attribute 'iteritems'

calibre 4.99.4 embedded-python: False is64bit: True
Linux-5.4.0-3-amd64-x86_64-with-debian-bullseye-sid Linux ('64bit', 'ELF')
('Linux', '5.4.0-3-amd64', '#1 SMP Debian 5.4.13-1 (2020-01-19)')
Python 3.7.6
Linux: ('debian', 'bullseye/sid', '')
Interface language: None
Successfully initialized third party plugins: Annotations (1, 12, 0) && Count Pages (1, 9, 0)
Traceback (most recent call last):
File "calibre_plugins.count_pages.action", line 115, in toolbar_triggered
File "calibre_plugins.count_pages.action", line 134, in _count_pages_on_selected
File "calibre_plugins.count_pages.action", line 157, in _get_column_validity
AttributeError: 'dict' object has no attribute 'iteritems'
asierra is offline   Reply With Quote
Old 02-16-2020, 02:57 PM   #1340
shamanNS
Wizard
shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.
 
Posts: 1,125
Karma: 12345678
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5, Kobo Libra 2, Kindle PW1
Update Calibre? Plugin (v1.9.0) is working correctly with Calibre v4.10.1 64-bit (on Windows 10).
shamanNS is offline   Reply With Quote
Advert
Old 02-16-2020, 05:03 PM   #1341
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,794
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by asierra View Post
Hello,

The plugin is not working anymore with current calibre 4.99.4 and I think it is because the plugin still uses python2 instead of python3.

Are you planning to create an updated version?

Thank you.
Why are you running version 4.99.4?

Not saying you shouldn't, but if you do you need to understand that version 4.99.x is a pre-release of what will be version 5.00. It has been released so that plugin developers/maintainers can test their python 3 compliance changes.

There are some relevant sticky threads in the Plugins subforum, including this one ==>> List of PIs to be ported to Python 3

You'll see that the Count Pages PI hasn't been updated to be python 3 compliant - yet. I have no doubt it will be before the general release of version 5 beta.

BR
BetterRed is offline   Reply With Quote
Old 02-16-2020, 06:52 PM   #1342
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by asierra View Post
Hello,

The plugin is not working anymore with current calibre 4.99.4 and I think it is because the plugin still uses python2 instead of python3.

Are you planning to create an updated version?

Thank you.

Alejandro Sierra

calibre, version 4.99.4
ERROR: Unhandled exception: <b>AttributeError</b>:'dict' object has no attribute 'iteritems'

calibre 4.99.4 embedded-python: False is64bit: True
Linux-5.4.0-3-amd64-x86_64-with-debian-bullseye-sid Linux ('64bit', 'ELF')
('Linux', '5.4.0-3-amd64', '#1 SMP Debian 5.4.13-1 (2020-01-19)')
Python 3.7.6
Linux: ('debian', 'bullseye/sid', '')
Interface language: None
Successfully initialized third party plugins: Annotations (1, 12, 0) && Count Pages (1, 9, 0)
Traceback (most recent call last):
File "calibre_plugins.count_pages.action", line 115, in toolbar_triggered
File "calibre_plugins.count_pages.action", line 134, in _count_pages_on_selected
File "calibre_plugins.count_pages.action", line 157, in _get_column_validity
AttributeError: 'dict' object has no attribute 'iteritems'
I haven't gotten around to doing the Python 3 work for Count Pages as yet, so it isn't going to work. I've been putting this one off as I expect it is going to be a pain. I'll probably start this week, but, that will depend on work and other things.

If you can revert to a released version of calibre, then I would recommend that. But, for some Linux distros that will still be a problem due to their use of Python 3.
davidfor is offline   Reply With Quote
Old 02-26-2020, 10:33 PM   #1343
asierra
Junior Member
asierra began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2011
Device: kindle
Works with Calibre 4.11.2

I installed Calibre 4.99 because that is the version distributed with GNU/Linux Debian Sid. But following your advice, I installed the latest release 4.11.2 and it works again.

Thank you DavidFor, BetterRed and shamanNS for your advice.
asierra is offline   Reply With Quote
Old 02-27-2020, 03:19 AM   #1344
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: 79,926
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
This is why Linux is a PIA. Windows doesn't have a Calibre ditribution other then the one that Kovid supplies on his website.
JSWolf is offline   Reply With Quote
Old 04-15-2020, 11:14 AM   #1345
Macondo
Member
Macondo began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2017
Device: kindle paperwhite 3
Hmmm, I also have a problem, but strange.
Till half an hour this plugin worked just as it should
And then, suddenly nothing. I click to get number of pages from goodreads, plug-in work like everything is ok, but then when I click on yes, nothing happened.
Even more, I had some pages, and I wanted to recheck them all and all pages are missing now.
I use Calibre portable 4.13 and didn't to any update those days.
Macondo is offline   Reply With Quote
Old 04-15-2020, 11:52 AM   #1346
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
If you use Windows 10, and it downloaded and installed Tuesday's Updates in the background, and you continued using your PC as usual without restarting your PC, you very well might have serious internet connection and/or browsing issues. Example: cannot log on to a routine site. I know this from personal experience yesterday, when multiple Zero-Day Patches were installed by Windows 10. I just restarted my PC to resume normal functions.
DaltonST is offline   Reply With Quote
Old 04-15-2020, 01:05 PM   #1347
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: 79,926
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DaltonST View Post
If you use Windows 10, and it downloaded and installed Tuesday's Updates in the background, and you continued using your PC as usual without restarting your PC, you very well might have serious internet connection and/or browsing issues. Example: cannot log on to a routine site. I know this from personal experience yesterday, when multiple Zero-Day Patches were installed by Windows 10. I just restarted my PC to resume normal functions.
I too have found if you have Windows Updates downloaded with Windows 10 that you should reboot ASAP.
JSWolf is offline   Reply With Quote
Old 04-15-2020, 11:15 PM   #1348
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Macondo View Post
Hmmm, I also have a problem, but strange.
Till half an hour this plugin worked just as it should
And then, suddenly nothing. I click to get number of pages from goodreads, plug-in work like everything is ok, but then when I click on yes, nothing happened.
Even more, I had some pages, and I wanted to recheck them all and all pages are missing now.
I use Calibre portable 4.13 and didn't to any update those days.
What does "nothing happened" mean? Starting the page count should start a job to do the count or download. That should run and prompt you when finished. If the job isn't running, that is probably a calibre issue. If it isn't getting the count after running, it is probably a external problem. It could be the Windows update the others mention, it could be the Goodreads site has changed. I have done a quick test and it fetched the page count from Goodreads with no issue.

Can you give more details on what is actually happening?
davidfor is offline   Reply With Quote
Old 05-02-2020, 04:14 AM   #1349
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Beta - Python 3 compatible

I promised one a long time ago, did the work, but, just keep forgetting to post it, Finally here it is, a Python 3 compatible beta of the Count Pages plugin.

The beta is completely compatible with the released version of calibre. And I have tested it with the previous Python 3 beta, and with the 4.99.5 beta released earlier. Nearly everything works.

The only problem I have is downloading the page count for some books from Goodreads. There is a problem on some pages that produce the error:

Code:
encoding not supported USC4 little endian, line 1, column 1
I assume it is an encoding issue on the site, but, I haven't worked out why or how to handle it.


Other than that, it is working for me. I am interested in here of success or problems with it in either the released version of calibre, or a Python 3 version. If there are any problems, please post the error from calibre and as much information as possible for me to reproduce it.

Edit: Kovid knew what the problem was. I have fixed the problem with the encoding and it works for all the test cases that I have. I have replaced the attached beta with version 1.9.2.

Last edited by BetterRed; 06-21-2020 at 06:36 PM. Reason: Remove beta attachments - now in the release
davidfor is offline   Reply With Quote
Old 05-02-2020, 07:31 AM   #1350
Bookstooge
Member Retired
Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.
 
Posts: 805
Karma: 2091358
Join Date: May 2019
Device: Kindle Oasis 1st Gen, PB Era
Just added it and will see how it works. I'm currently using calibre 4.10.1.

edited to add:

works fine for me. I used it on a new book and had a page count and I checked it on a book I'd recently page counted and the numbers came up the same. I'm using the ADE algorithm to calculate the page count.

Last edited by Bookstooge; 05-02-2020 at 07:44 AM.
Bookstooge 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 1252 08-02-2025 09:53 AM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 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 01:19 AM.


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