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 01-20-2021, 01:28 PM   #871
Atcold
Junior Member
Atcold began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
Unhappy

Hum, having some issues here. I've just clicked on “Fetch annotations […]” and this pops up.

Code:
calibre, version 5.9.0
ERROR: Unhandled exception: <b>TypeError</b>:'&lt;' not supported between instances of 'NoneType' and 'NoneType'

calibre 5.9  embedded-python: True is64bit: True
macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '20.2.0', 'Darwin Kernel Version 20.2.0: Wed Dec  2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64')
Python 3.8.5
OSX: ('10.16', ('', '', ''), 'x86_64')
Interface language: en_GB
Successfully initialized third party plugins: Annotations (1, 14, 0)
Traceback (most recent call last):
  File "calibre_plugins.annotations.annotated_books", line 168, in sort
    self.arraydata = sorted(self.arraydata, key=operator.itemgetter(Ncol), reverse=(order == Qt.DescendingOrder))
TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'
How can I debug this?
Atcold is offline   Reply With Quote
Old 01-20-2021, 03:41 PM   #872
Atcold
Junior Member
Atcold began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
Unhappy

I've installed the 1.14.4 and now I get the window “No annotated books found on device” popup telling me that it was “Unable to find any annotations on Amazon Kindle matching books in your library.”.

Before I was getting a partial list, despite the error.
Now I'm getting nothing.
Atcold is offline   Reply With Quote
Old 01-20-2021, 04:54 PM   #873
Atcold
Junior Member
Atcold began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
Question Debugging

So, I figured that the bug is in annotated_books.py at the else below:

Code:
def sort(self, Ncol, order=Qt.AscendingOrder):
    """
    Sort table by given column number.
    """
    self.layoutAboutToBeChanged.emit()
    if Ncol == self.ENABLED_COL: # Don't sort on the checkbox column.
        self.arraydata = sorted(self.arraydata, key=lambda row: row[Ncol].checkState(), reverse=(order == Qt.DescendingOrder))
    else:
        self.arraydata = sorted(self.arraydata, key=operator.itemgetter(Ncol), reverse=(order == Qt.DescendingOrder))
    self.layoutChanged.emit()
I printed out self.arraydata and I get

Code:
DEBUG:   18.9 Trying to sort this:  [['b99a2e76-53bf-4100-948b-3c41f42a2c03', '2', 'COMPUTERS / Programming / General', <PyQt5.QtWidgets.QCheckBox object at 0x12f5a2ee0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x13090ea60>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x13090eaf0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x13090eb80>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x13090e9d0>, 5, 5], ['86c19abd-5cb6-41c5-8da5-d641c4b6b8a0', '1', 'History, Ancient, Greece, Philosophy, Political, History & Surveys, Ancient & Classical', <PyQt5.QtWidgets.QCheckBox object at 0x13090ec10>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x13090ed30>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x13090ee50>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x13090eee0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x13090eca0>, 1, 5], [None, '-8', '', <PyQt5.QtWidgets.QCheckBox object at 0x13090ef70>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x1309120d0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912160>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x1309121f0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912040>, 7, 0], [None, '-9', '', <PyQt5.QtWidgets.QCheckBox object at 0x130912280>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x1309123a0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912430>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x1309124c0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912310>, 13, 0], [None, '-21', '', <PyQt5.QtWidgets.QCheckBox object at 0x130912550>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912670>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912700>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912790>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x1309125e0>, 21, 0], [None, '-22', '', <PyQt5.QtWidgets.QCheckBox object at 0x130912820>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x1309129d0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912a60>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912af0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912940>, 3, 0], [None, '-26', '', <PyQt5.QtWidgets.QCheckBox object at 0x130912c10>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912ca0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912d30>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912dc0>, <calibre_plugins.annotations.annotated_books.SortableTableWidgetItem object at 0x130912b80>, 49, 0]]
Not sure how to move forward.
Atcold is offline   Reply With Quote
Old 01-21-2021, 01:36 AM   #874
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: 20,879
Karma: 36705696
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@Atcold: I'm not sure how that can happen with the recent betas. The first element in each of the lists should be None. And, there should be no way for the dialog to be sorted by that column. Could you send me a copy of you "annotations.json" file? This is in your calibre configuration directory in the plugins sub-directory and contains the options you have used for the plugin.

But, the attached beta should fix this. I have tested it with my Kobo devices. There is differences in how the other devices are handled, and this problem has come up because of KFX format books (and other changes I made).

Edit: Now with the actual attachment!
Attached Files
File Type: zip Annotations-beta.zip (673.4 KB, 7 views)

Last edited by davidfor; 01-21-2021 at 01:45 AM.
davidfor is offline   Reply With Quote
Old 01-21-2021, 04:14 PM   #875
Atcold
Junior Member
Atcold began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
Post Attached the JSON as requested plus my clippings

With this 1.14.6 I get “No annotated books found on device” again.
Also, when I was bypassing the sorting, not all books / annotations were fetched (and specifically the last book I've been reading).

Thanks for your support and apologies for the double post (it went in a moderation queue for its length, but I thought the forum glitched instead).
Attached Files
File Type: zip My Clippings - Kindle.txt.zip (18.2 KB, 4 views)
File Type: zip annotations.json.zip (1.0 KB, 4 views)
Atcold is offline   Reply With Quote
Old 01-21-2021, 08:49 PM   #876
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: 20,879
Karma: 36705696
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Atcold View Post
With this 1.14.6 I get “No annotated books found on device” again.
Also, when I was bypassing the sorting, not all books / annotations were fetched (and specifically the last book I've been reading).

Thanks for your support and apologies for the double post (it went in a moderation queue for its length, but I thought the forum glitched instead).
There isn't anything obviously wrong with those files. Could you run calibre in debug mode and send me the log. I'll have to look through it to see what is happening.
davidfor is offline   Reply With Quote
Old Yesterday, 07:22 PM   #877
Atcold
Junior Member
Atcold began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
Post Log file

Quote:
Originally Posted by davidfor View Post
There isn't anything obviously wrong with those files. Could you run calibre in debug mode and send me the log. I'll have to look through it to see what is happening.
Here you have the log using the latest version of your plugin.
Attached Files
File Type: zip tmpl0bs82j6.txt.zip (2.0 KB, 3 views)
Atcold is offline   Reply With Quote
Old Today, 08:47 AM   #878
Noirtier
Junior Member
Noirtier began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2021
Device: Kobo Forma
Quote:
Originally Posted by davidfor View Post
OK. For the OPF file, I meant from the calibre library. Click the "Open path" in the details panel for the book and it will show the directory with the book in it. There should be an OPF file. Calibre uses this as part of its backup.

I'll have to retest this. It seemed to work adding the annotation, but, maybe I missed something.
Ah thank you, I see now. I will send you a new PM with the Calibre folders for each of the examples I sent you previously, so that you have a copy of the metadata.opf files.

P.S. I think I have figured out how to get email notifications in this forum now so hopefully will be a bit quicker to reply next time
Noirtier 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] KindleUnpack - The Plugin DiapDealer Plugins 464 01-04-2021 07:38 PM
[GUI Plugin] Open With kiwidude Plugins 372 10-31-2020 11:15 AM
[GUI Plugin] Annotations (closed) GRiker Plugins 68 06-17-2014 07:11 AM
[GUI Plugin] KiNotes -axel- Plugins 0 07-14-2013 07:39 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 01:48 PM.


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