![]() |
#1 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2017
Device: iPhone 6
|
SampleExportingApp Not Working Properly
Long time user of Calibre, but now I want to import annotations. I tried your
SampleExportingApp modified to use your highlight example. Using a mockup epub of the "John Smith" book, I get as far as the Import Annotations pop-up showing all the correct info including the 3 annotations. But then I get error messages: Unable to import annotations from SampleExportingApp -and- UnboundLocalError: local variable 'updated_annorations' referenced before assignment. The console log shows: File "calibre_plugins.annotations.annotations", line 165, in to_HTML TypeError: '<' not supported between instances of 'NoneType' and 'NoneType' -and- File "calibre_plugins.annotations.action", line 1057, in present_annotated_books UnboundLocalError: local variable 'updated_annotations' referenced before assignment. I'm using Windows 10 10.0.19041 [64bit] and calibre 5.27 [64bit] Attached are the my actions, debug console listing and the mockup epub Thanks Larry |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2017
Device: iPhone 6
|
Added: SampleExportingApp.py
|
![]() |
![]() |
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
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.
|
![]() |
![]() |
![]() |
#4 | |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2017
Device: iPhone 6
|
Quote:
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 08:48 PM. |
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2017
Device: iPhone 6
|
Added "Import Annotations" image.
|
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
OK, I see what you mean now. I've obviously missed updating something in the sample. But, I don't get the error, or the Import Annotations dialog. That's probably something in my test environment. I'll try and look at it over the weekend.
If you look at the Goodreader code, that does work and you can test using an export from app if you want to install it somewhere. |
![]() |
![]() |
![]() |
Tags |
sampleexportingapp |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Spanish recipes not working properly | Spyral | Recipes | 10 | 11-28-2021 02:47 PM |
Arrange into folders not working properly | DrChiper | Editor | 5 | 03-01-2014 02:10 PM |
Links not working properly? | dokkeynot | Sigil | 1 | 06-27-2012 03:04 PM |
Kindle for pc not working properly | bodhran | Amazon Kindle | 4 | 09-18-2011 02:45 PM |
lrf files not working properly | munty | LRF | 4 | 01-25-2009 06:01 PM |