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 06-09-2011, 06:55 PM   #46
nynaevelan
eBook Junkie
nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.nynaevelan ought to be getting tired of karma fortunes by now.
 
nynaevelan's Avatar
 
Posts: 1,403
Karma: 1459924
Join Date: May 2010
Location: USA
Device: Kindle Fire HD 2012, Kindle PW2, Galaxy Tab 10.1
Quote:
Originally Posted by kiwidude View Post
@Nyn - yeah I don't consider that time unreasonable, given that you have mobi files so it is converting each one to ePub to count the words. I could possibly remove the need for the conversion with a little work, using similar code to what user_none has in his APNX file stuff. But this is one of those things that you only need to run once and it runs in the background, so a few seconds here or there shouldn't really make a huge difference. I'll put it on the todo list to do some proper testing at some point to see what difference it makes.
I wish I would have known that, I would have picked the epub version instead. But no worries, when I start big jobs like that I just move on to something else while it is running. Although I am debating whether I want to keep the data, seeing a book has over 20,000 might deter me away from wanting to read it.
nynaevelan is offline   Reply With Quote
Old 06-11-2011, 08:47 PM   #47
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
A bug in this plugin if only word count is configured:
Code:
Traceback (most recent call last):
  File "calibre_plugins.count_pages.action", line 56, in count_pages
NameError: global name 'is_value_word_col' is not defined
edit - also got this error when I edited a book which has both an epub and mobi file:
Code:
calibre, version 0.8.5
ERROR: Failed to count pages: <b>Failed</b>: Count ePub Pages

Count ePub Pages
Python function terminated unexpectedly: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 147, in main
    return run_entry_point()
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 116, in run_entry_point
    return getattr(pmod, func)()
  File "/Users/ldolse/calibredev/heuristics/src/calibre/utils/ipc/worker.py", line 181, in main
    result = func(*args, **kwargs)
  File "/Users/ldolse/calibredev/heuristics/src/calibre/utils/ipc/worker.py", line 138, in arbitrary_n
    return func(*args, **kwargs)
  File "calibre_plugins.count_pages.jobs", line 53, in do_count_pages
TypeError: 'NoneType' object is not iterable
Not sure why it's a coming back as a NoneType object... other books do work, so not sure what's special about this one.

Last edited by ldolse; 06-13-2011 at 08:30 AM.
ldolse is offline   Reply With Quote
 
Enthusiast
Old 06-12-2011, 08:43 AM   #48
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Idolse - thx for that, between this and the Find Duplicates plugin this is obviously going to be one of those days to try my patience with crappy dev tools...

Will have a new version later. May as well change the MOBI page count algorithm while I am at it to use the MOBI file directly rather than require a conversion.
kiwidude is offline   Reply With Quote
Old 06-12-2011, 09:37 AM   #49
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
v1.1.1 Released

Changes in this release:
  • Fix bug if user chooses to retrieve only word count
  • If an unexpected error thrown while counting, include in log
  • Display log and no results dialog if no statistics were gathered
  • Change Mobi word count to not require a conversion
kiwidude is offline   Reply With Quote
Old 06-12-2011, 08:07 PM   #50
CWatkinsNash
IOC Chief Archivist
CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.
 
CWatkinsNash's Avatar
 
Posts: 3,467
Karma: 31617794
Join Date: Dec 2010
Location: Nashville, TN, USA
Device: Nook STR Glowlight, Sony T1, Acer Iconia A200
I like the word count addition, but I ran into a problem today and I'm not sure where it came from.

Today I updated Plugin Updater, restarted, then updated Count Pages (also with Updater), restarted again. I didn't notice right away, but my Count Pages button was missing from the toolbar. Once I noticed, I went into Preferences > Plugins and tried to open the configuration but it told me I had to restart calbre before configuring. Okay, I restarted again. Same result. Restarted again, this time shutting it down then starting from the icon rather than using the "restart" button. Same result.

I didn't pursue the troubleshooting at that point because I was getting ready to update to 0.8.5 anyway, so I just uninstalled 0.8.4 then installed 0.8.5. (Normally I just install over the old one but since I was having problems and other people were having different problems, I figured it couldn't hurt to install clean.)

Anyway, once that was done, I started calibre and the button is back where it should be and working perfectly. Thing is, I don't know if it was a problem with the plugin, an updating problem, or a calibre problem, which is why I'm bringing it to you. And no, I didn't try a debug, and since there were no error messages, I have no errors to share. I know, I'm not much help, but I just thought I'd mention what happened.

Edited to add: Before I went into Preferences>Plugins, I also went into the toolbar config and the button was not available to add to any toolbars. It wasn't there at all.
CWatkinsNash is offline   Reply With Quote
Old 06-12-2011, 09:20 PM   #51
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@CWatkinsNash - I had forgotten that this plugin is now dependent on 0.8.5, I have just now updated the plugin index and first post to mention that which would have prevented you from installing it.

A plugin disappearing from your toolbar when you know it is installed is a sign it is throwing an error at Calibre startup, you can view the error by starting in debug mode. In this case the error would have been it could not find something in your Calibre 0.8.4 it was depending on.

Now you are at 0.8.5 you will have no further issues with your toolbar.
kiwidude is offline   Reply With Quote
Old 06-12-2011, 09:27 PM   #52
CWatkinsNash
IOC Chief Archivist
CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.CWatkinsNash ought to be getting tired of karma fortunes by now.
 
CWatkinsNash's Avatar
 
Posts: 3,467
Karma: 31617794
Join Date: Dec 2010
Location: Nashville, TN, USA
Device: Nook STR Glowlight, Sony T1, Acer Iconia A200
Quote:
Originally Posted by kiwidude View Post
@CWatkinsNash - I had forgotten that this plugin is now dependent on 0.8.5, I have just now updated the plugin index and first post to mention that which would have prevented you from installing it.
LOL Well, that explains it! That's what I get for doing my updates backwards from my usual method. I almost always update calibre first. Thanks for the explanation!
CWatkinsNash is offline   Reply With Quote
Old 06-13-2011, 07:09 AM   #53
beckywc
Addict
beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.beckywc ought to be getting tired of karma fortunes by now.
 
beckywc's Avatar
 
Posts: 270
Karma: 1050426
Join Date: Feb 2010
Location: California
Device: iPad Mini w/Retina, Kindle 3, Kindle Fire HDX 8.9, & Asus Transformer
Since upgrading to 1.1.1 the plug in no longer counts most mobi files I get this error.

Count ePub/Mobi Statistics
Failed to initialize plugin: 'F:\\Calibre Portable\\Calibre Settings\\plugins\\Goodreads Covers.zip'
Failed to initialize plugin: 'F:\\Calibre Portable\\Calibre Settings\\plugins\\Goodreads Metadata.zip'
-------------------------------
Logfile for book ID 21 (Granite Lake Wolves 01: Wolf Signs - MOBI)
FAILED TO COUNT PAGES
FAILED TO COUNT WORDS
21
Failed to initialize plugin: 'F:\\Calibre Portable\\Calibre Settings\\plugins\\Goodreads Covers.zip'
Failed to initialize plugin: 'F:\\Calibre Portable\\Calibre Settings\\plugins\\Goodreads Metadata.zip'
Traceback (most recent call last):
File "calibre_plugins.count_pages.jobs", line 92, in do_statistics_for_book
File "calibre_plugins.count_pages.statistics", line 31, in get_word_count
File "calibre_plugins.count_pages.statistics", line 141, in get_mobi_standard_word_count
File "calibre_plugins.count_pages.statistics", line 182, in _read_mobi_file
UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 1485: invalid start byte

It was working before because it had counted the pages (before update), I added word count column but no go.
beckywc is offline   Reply With Quote
Old 06-13-2011, 07:57 AM   #54
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
I see from your debug log that you still have installed legacy versions of the Goodreads metadata plugins that no longer work. I would suggest uninstalling both the "Goodreads Covers" and "Goodreads Metadata" plugins. If you cannot do it from the gui, do it from a command line with:
calibre-customize -r "Goodreads Covers"
calibre-customize -r "Goodreads Metadata"

In regards to your Mobi error, all mobi files are working fine for me. Could you PM me a link to one of the files giving you an error?
kiwidude is offline   Reply With Quote
Old 06-13-2011, 08:15 AM   #55
drMerry
Addict
drMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmosdrMerry has become one with the cosmos
 
drMerry's Avatar
 
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
Quote:
Originally Posted by kiwidude View Post
I see from your debug log that you still have installed legacy versions of the Goodreads metadata plugins that no longer work.
I had a lot of problems in my calibre version too, until I found out I had still the old version of this plugin installed.

While a lot of users use your update plugin, you could maybe add a extra clear warning to users that have installed this plugin (it is not seen on the updater at all!)
drMerry is offline   Reply With Quote
Old 06-13-2011, 08:17 AM   #56
desideria
Member
desideria began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2011
Device: none
I didn't realise that the plugin can count the number of the words untill yesterday. But after I configured the plugin, I got this message every time I try to count the words. And it happend with all the books I tryed. With count the pages I don't have any trouble, but I really wanna use the count words.

Traceback (most recent call last):
File "site-packages\calibre\gui2\actions\edit_metadata.py", line 495, in do_one_apply
File "site-packages\calibre\library\database2.py", line 1907, in set_metadata
File "site-packages\calibre\library\database2.py", line 1821, in doit
File "site-packages\calibre\library\custom_columns.py", line 461, in set_custom
File "site-packages\calibre\library\custom_columns.py", line 480, in _set_custom
File "site-packages\calibre\library\custom_columns.py", line 141, in adapt_text
AttributeError: 'int' object has no attribute 'decode'
desideria is offline   Reply With Quote
Old 06-13-2011, 08:26 AM   #57
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Quote:
Originally Posted by drMerry View Post
I had a lot of problems in my calibre version too, until I found out I had still the old version of this plugin installed.

While a lot of users use your update plugin, you could maybe add a extra clear warning to users that have installed this plugin (it is not seen on the updater at all!)
AFAIK there is very little I can do, due to how Kovid chose to deprecate non 0.8 plugins in this way. My implementation with the plugin updater and the "Deprecated" attribute etc would ordinarily take care of this. However from memory Calibre at startup disables such plugins and does not make them "visible" to the application. So in theory it should do no "harm" to have them installed, other than they will keep on showing in debug logs and I don't think you can uninstall them other than using the command line. Again that is all from memory and Kovid can correct me if talking crap here.
kiwidude is offline   Reply With Quote
Old 06-13-2011, 08:28 AM   #58
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Quote:
Originally Posted by desideria View Post
I didn't realise that the plugin can count the number of the words untill yesterday. But after I configured the plugin, I got this message every time I try to count the words. And it happend with all the books I tryed. With count the pages I don't have any trouble, but I really wanna use the count words.

Traceback (most recent call last):
File "site-packages\calibre\gui2\actions\edit_metadata.py", line 495, in do_one_apply
File "site-packages\calibre\library\database2.py", line 1907, in set_metadata
File "site-packages\calibre\library\database2.py", line 1821, in doit
File "site-packages\calibre\library\custom_columns.py", line 461, in set_custom
File "site-packages\calibre\library\custom_columns.py", line 480, in _set_custom
File "site-packages\calibre\library\custom_columns.py", line 141, in adapt_text
AttributeError: 'int' object has no attribute 'decode'
Never seen anything like that before. Perhaps there is an issue with your custom column? What datatype is it? What does the plugin log show when you click View Log?
kiwidude is offline   Reply With Quote
Old 06-13-2011, 08:35 AM   #59
desideria
Member
desideria began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2011
Device: none
Thank you very much. It was because of the column. I changed the tipe of the column and now it works perfectly. Thanks a lot, I really love this plugin, is the best of all I have installed.
desideria is offline   Reply With Quote
Old 06-13-2011, 08:44 AM   #60
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@desideria - glad you are now up and running. I am guessing it was of type "text"? I think I allowed you to "choose" text columns then didn't test that, I will fix it in the next release.
kiwidude is offline   Reply With Quote
Reply

Tags
page count

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quick Preferences kiwidude Plugins 32 09-13-2014 10:34 PM
[GUI Plugin] Quality Check kiwidude Plugins 780 09-12-2014 10:04 PM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 12:02 AM
[GUI Plugin] Open With kiwidude Plugins 228 07-31-2014 01:06 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 03:56 PM.


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