01-20-2021, 12:28 PM | #871 |
Member
Posts: 10
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
|
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>:'<' 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' |
01-20-2021, 02:41 PM | #872 |
Member
Posts: 10
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
|
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. |
01-20-2021, 03:54 PM | #873 |
Member
Posts: 10
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
|
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() 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]] |
01-21-2021, 12:36 AM | #874 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
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! Last edited by davidfor; 01-21-2021 at 12:45 AM. |
01-21-2021, 03:14 PM | #875 |
Member
Posts: 10
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
|
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). |
01-21-2021, 07:49 PM | #876 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
01-22-2021, 06:22 PM | #877 |
Member
Posts: 10
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
|
Log file
Here you have the log using the latest version of your plugin.
|
01-23-2021, 07:47 AM | #878 | |
Member
Posts: 17
Karma: 10
Join Date: Jan 2021
Device: Kobo Forma
|
Quote:
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 |
|
01-24-2021, 02:00 AM | #879 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Sorry, I forget to ask people to turn the debug option in the plugin. It is at the top of the plugin's configuration dialog. Not having that turned means there is very little information in the debug log.
|
01-24-2021, 12:50 PM | #880 | ||
Member
Posts: 10
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
|
Thread notification? AND extensive log file for David
Quote:
Quote:
Could you also explain to me what your plug-in does? I cannot manually locate any bookmark file in /Volumes/Kindle/documents/<author name>. Also, I see Atomic Habits in the resolve_path section (line 118) but not after List of storage devices (line 136). So, it does not pop up in the resolved_path_map (line 232). |
||
01-24-2021, 03:25 PM | #881 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2020
Device: Kobo Libra H2O
|
Random order in annotations extracted from synced KePub
I am using the Annotations plug-in to extract notes and highlights from a synchronised KePub on my Kobo Libra H2O.
The annotations fetched are in a random order which is very hard to follow (see screenshot). It is neither in the chapter order or chronological order. Some notes seem to be either missing in location or indexed to more than one chapter. For example, the first note in the screenshot is under both ‘Introduction’ and Chapter 2. I am not sure whether there is a highlight missing under ‘Introduction’ or if the annotation from Chapter 2 below just got randomly anchored to also ‘Introduction’. Is there a way to extract annotations in a more logical order, such as following the chapter order or chronological, added order? Thanks a lot in advance. |
01-25-2021, 12:42 AM | #882 | |||
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Quote:
Quote:
Is the book actually on the device? If so, what is the full path for it? Does calibre show it as on the device in the library? Last edited by davidfor; 01-25-2021 at 12:43 AM. Reason: Fix quoting |
|||
01-26-2021, 12:27 AM | #883 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
The attached beta should fix this. There was also a case where there would be no chapter name. This happened if the annotation was in an internal file that did not have a ToC entry. These were also part of the cause for annotations being out of order. |
|
01-26-2021, 01:05 AM | #884 | ||||||
Member
Posts: 10
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
|
Quote:
Quote:
Quote:
I've been loading these, and intermediate results, a few times to check the results. Quote:
Quote:
Full path: /Volumes/Kindle/documents/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Prn Way to Build Good Habits & Break Bad Ones - James Clear.azw3 Yes, Calibre has a green check on it. Here you have the tree for Clear, James: Clear_James-tree.txt.zip. |
||||||
01-26-2021, 05:05 AM | #885 | ||
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Yes, calibre version 5 uses Python 3. There are differences in the language and the plugins needed to be updated to handle this. A lot is backwardly compatible with Python 2 but some things need to be handled for each version. At the moment, I am maintaining compatibility with older calibre versions of calibre. I broke the compatibility with a change, and then broke everything fixing that.
Quote:
Quote:
Code:
/<storage>/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Proay to Build Good Habits & Break Bad Ones - James Clear.bookmark Code:
/Volumes/Kindle/documents/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Proay to Build Good Habits & Break Bad Ones - James Clear.azw3 Code:
/Volumes/Kindle/documents/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Prn Way to Build Good Habits & Break Bad Ones - James Clear.azw3 Code:
/<storage>/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Proay to Build Good Habits & Break Bad Ones - James Clear.bookmark /Volumes/Kindle/documents/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Proay to Build Good Habits & Break Bad Ones - James Clear.azw3 /Volumes/Kindle/documents/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Prn Way to Build Good Habits & Break Bad Ones - James Clear.azw3 And the scan for books doesn't find it as it is not recursive. So, it is only searching "/Volumes/Kindle/documents". And that is something I hadn't noticed before. This is all in that was written by the original developer and I never quite understood why it was done this way. I have written the code for the Kobo and tolino device and have handled getting the list of books in a very different way. For the Kobo, no reference is actually needed to the metadata in the books. For the tolino, it is much closer to the way the Kindle works and the metadata has to be retrieved from the books on the device. So, in the attached beta I have change the way to get the list of books. This is based on the methods mentioned above. It should be accurate as it uses a calibre search to get the books on the device that are in the library and then uses other calibre functions to get the path to the book. This should work better than the existing method. Unfortunately, I have no way to test it. I don't have a Kindle or a good way to simulate it. The code should be good, but, there might be something. Please run it and send me the debug lot to look at. |
||
Tags |
sampleexportingapp |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 AM |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 492 | 10-25-2022 08:13 AM |
[GUI Plugin] Annotations (closed) | GRiker | Plugins | 68 | 06-17-2014 06:11 AM |
[GUI Plugin] KiNotes | -axel- | Plugins | 0 | 07-14-2013 06:39 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |