View Single Post
Old 09-21-2021, 07:43 PM   #4
lsacher
Junior Member
lsacher began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2017
Device: iPhone 6
Quote:
Originally Posted by davidfor View Post
Looking at your supplied SampleExportingApp.py, you have not added the code to read the annotations from anywhere. This file is a template for reading the annotations from a file produced by an ereader app. It does not actually work as it has no code to actually import anything. If you want to add support for another app, you need to add the code to parse the annotations from that app. You can look at the GoodReader.py for an example of this.
I am aware that this app is not reading anything in, but rather it uses your test data already hardcoded in the app which amounts to 3 items which it pre-process OK. But when it goes to update the info it gets:

File "calibre_plugins.annotations.annotations", line 165, in to_HTML
TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'

At line 165 in "annotations.py" the contents of "self.annotations" contains 3 objects:

[<calibre_plugins.annotations.annotations.Annotatio n object at 0x000001F265FA7CD0>,<calibre_plugins.annotations.a nnotations.Annotation object at 0x000001F265FA7E50>,<calibre_plugins.annotations.a nnotations.Annotation object at 0x000001F265FA7EB0>]

Your DEBUG info in "Console_Listing.txt" shows 3 items and the contents of one:

DEBUG: 65.0 AnnotatedBooksDialog::__init__ book_data= active: True
annotations: 3
author: 'John Smith'
author_sort: None
book_id: 883
cid: 883
confidence: None
genre: ''
last_annotation: None
last_update: 1354627020.0
path: None
reader_app: 'SampleExportingApp'
title: 'A Book With Some Exported Annotations'
title_sort: None
uuid: None

It seems to be getting the data, but not in a format it likes.

Last edited by lsacher; 09-21-2021 at 07:48 PM.
lsacher is offline   Reply With Quote