Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 05-15-2022, 01:05 PM   #1051
Huwaetzel
Enthusiast
Huwaetzel began at the beginning.
 
Posts: 33
Karma: 10
Join Date: May 2011
Device: Pocketbook 903
Hi Davidfor - With my pocketbook PB741 with latest firmware and Ubuntu 22.04 I needed to use the beta to get annotations work at all. But there seems to be a problem with accessing the database because annotations does not find any book and no annotation in a book which is clearly annotated.

calibre, version 5.37.0
FEHLER: Unbehandelter Ausnahmefehler: <b>TypeError</b>:expected str, bytes or os.PathLike object, not NoneType

calibre 5.37 embedded-python: False is64bit: True
Linux-5.15.0-30-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.15.0-30-generic', '#31-Ubuntu SMP Thu May 5 10:00:34 UTC 2022')
Python 3.10.4
Interface language: de
Successfully initialized third party plugins: DeACSM (0, 0, 15) && DeDRM (7, 2, 1) && Annotations (1, 17, 2) && DNB_DE (3, 1, 7) && Favourites Menu (1, 1, 0) && Find Duplicates (1, 9, 5) && KOReader Sync (0, 2, 7) && Pocketbook Tools (0, 9, 5)
Traceback (most recent call last):
File "calibre_plugins.annotations.action", line 363, in fetch_usb_connected_device_annotations
self.fetch_usb_device_annotations(self.get_connect ed_device_primary_name())
File "calibre_plugins.annotations.action", line 407, in fetch_usb_device_annotations
annotated_book_list = self.get_annotated_books_on_usb_device(reader_app)
File "calibre_plugins.annotations.action", line 624, in get_annotated_books_on_usb_device
ra.get_active_annotations()
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 62, in get_active_annotations
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 344, in _fetch_annotations
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 363, in _read_database_annotations
File "/usr/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

I appreciate the work you are doing with this very universal annotation plugin. Keeping up with all the variants is probably a challenge, but also for me keeping track of annotations is crucial.

Please let me know, if you need further background or you want me to do a special debug.

Thank you
Huwaetzel is offline   Reply With Quote
Old 05-16-2022, 12:20 AM   #1052
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: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Huwaetzel View Post
Hi Davidfor - With my pocketbook PB741 with latest firmware and Ubuntu 22.04 I needed to use the beta to get annotations work at all. But there seems to be a problem with accessing the database because annotations does not find any book and no annotation in a book which is clearly annotated.

calibre, version 5.37.0
FEHLER: Unbehandelter Ausnahmefehler: <b>TypeError</b>:expected str, bytes or os.PathLike object, not NoneType

calibre 5.37 embedded-python: False is64bit: True
Linux-5.15.0-30-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.15.0-30-generic', '#31-Ubuntu SMP Thu May 5 10:00:34 UTC 2022')
Python 3.10.4
Interface language: de
Successfully initialized third party plugins: DeACSM (0, 0, 15) && DeDRM (7, 2, 1) && Annotations (1, 17, 2) && DNB_DE (3, 1, 7) && Favourites Menu (1, 1, 0) && Find Duplicates (1, 9, 5) && KOReader Sync (0, 2, 7) && Pocketbook Tools (0, 9, 5)
Traceback (most recent call last):
File "calibre_plugins.annotations.action", line 363, in fetch_usb_connected_device_annotations
self.fetch_usb_device_annotations(self.get_connect ed_device_primary_name())
File "calibre_plugins.annotations.action", line 407, in fetch_usb_device_annotations
annotated_book_list = self.get_annotated_books_on_usb_device(reader_app)
File "calibre_plugins.annotations.action", line 624, in get_annotated_books_on_usb_device
ra.get_active_annotations()
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 62, in get_active_annotations
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 344, in _fetch_annotations
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 363, in _read_database_annotations
File "/usr/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

I appreciate the work you are doing with this very universal annotation plugin. Keeping up with all the variants is probably a challenge, but also for me keeping track of annotations is crucial.

Please let me know, if you need further background or you want me to do a special debug.

Thank you
I don't have a PocketBook to test this. But, do they have some sort of "virtual" book? The line with the error is building a file path using data from the database on the device. One of those is a null value in the database for one of the books. That could happen if the book had some sort of different status such as it hasn't been downloaded from wherever PocketBook stores books. Or there is a special location for a particular type or source of books. I don't know how PocketBook works at all. For Kobo, they do both. Purchased books can have an entry in the database but the book is not actually downloaded, and when they are, they are stored in a specific location and the database entry has the file name, but, not the full path.

Hopefully @wold will be around and have an answer. Otherwise, I would need to see the database from the device to make a better guess.
davidfor is offline   Reply With Quote
Advert
Old 05-19-2022, 11:53 AM   #1053
Huwaetzel
Enthusiast
Huwaetzel began at the beginning.
 
Posts: 33
Karma: 10
Join Date: May 2011
Device: Pocketbook 903
Quote:
Originally Posted by davidfor View Post
I don't have a PocketBook to test this. But, do they have some sort of "virtual" book? The line with the error is building a file path using data from the database on the device. One of those is a null value in the database for one of the books. That could happen if the book had some sort of different status such as it hasn't been downloaded from wherever PocketBook stores books. Or there is a special location for a particular type or source of books. I don't know how PocketBook works at all. For Kobo, they do both. Purchased books can have an entry in the database but the book is not actually downloaded, and when they are, they are stored in a specific location and the database entry has the file name, but, not the full path.

Hopefully @wold will be around and have an answer. Otherwise, I would need to see the database from the device to make a better guess.
What you are describing is a good potential explanation. Pocketbook can make use of different cloud solutions, their own cloud or also DropBox. There is a general potential, and was the case when run into the error, that not all books from the cloud are downloaded to the device itself and therefore probably do not have a path assigned to. A potential solution would be to ignore those books because also no annotations may be downloaded, in case the book is not downloaded. With the download also the annotation comes and is available on the reader with the book
Huwaetzel is offline   Reply With Quote
Old 05-22-2022, 05:20 AM   #1054
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: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Huwaetzel View Post
What you are describing is a good potential explanation. Pocketbook can make use of different cloud solutions, their own cloud or also DropBox. There is a general potential, and was the case when run into the error, that not all books from the cloud are downloaded to the device itself and therefore probably do not have a path assigned to. A potential solution would be to ignore those books because also no annotations may be downloaded, in case the book is not downloaded. With the download also the annotation comes and is available on the reader with the book
The attached beta should workaround this. It will skip the books on the device when the path or filename in the database is null. Unfortunately, I can't test it. But, the code should be good.
Attached Files
File Type: zip Annotations-beta.zip (681.0 KB, 371 views)
davidfor is offline   Reply With Quote
Old 05-23-2022, 02:45 PM   #1055
Huwaetzel
Enthusiast
Huwaetzel began at the beginning.
 
Posts: 33
Karma: 10
Join Date: May 2011
Device: Pocketbook 903
Hi davidfor:

thank you for the quick turn around. This did solve the error "a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType"

The new error message looks different:

calibre, version 5.37.0
FEHLER: Unbehandelter Ausnahmefehler: <b>TypeError</b>:unsupported operand type(s) for *: 'NoneType' and 'int'

calibre 5.37 embedded-python: False is64bit: True
Linux-5.15.0-30-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.15.0-30-generic', '#31-Ubuntu SMP Thu May 5 10:00:34 UTC 2022')
Python 3.10.4
Interface language: de
Successfully initialized third party plugins: DeACSM (0, 0, 15) && DeDRM (7, 2, 1) && Annotations (1, 17, 3) && DNB_DE (3, 1, 7) && Favourites Menu (1, 1, 0) && Find Duplicates (1, 9, 5) && KOReader Sync (0, 2, 7) && Pocketbook Tools (0, 9, 5)
Traceback (most recent call last):
File "calibre_plugins.annotations.action", line 363, in fetch_usb_connected_device_annotations
self.fetch_usb_device_annotations(self.get_connect ed_device_primary_name())
File "calibre_plugins.annotations.action", line 407, in fetch_usb_device_annotations
annotated_book_list = self.get_annotated_books_on_usb_device(reader_app)
File "calibre_plugins.annotations.action", line 624, in get_annotated_books_on_usb_device
ra.get_active_annotations()
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 62, in get_active_annotations
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 344, in _fetch_annotations
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 441, in _read_database_annotations
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
Huwaetzel is offline   Reply With Quote
Advert
Old 05-25-2022, 01:22 AM   #1056
aik099
Enthusiast
aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!
 
Posts: 33
Karma: 100180
Join Date: Apr 2020
Device: none
Fixing "ThreadingViolation", when using MTP driver

Quote:
Originally Posted by davidfor View Post
OK, I can see the problem. I had my phone as an ignored device, so calibre wasn't going through the code that is failing for you. The attached beta fixes this. But, the error is in code that was added to support the Boox devices. I do not have one of these devices, so I do not have a way to test if it still works for these devices. And I do not have a way to test under Linux or Mac.


@aik099: Could you test this on your device? The problem is in the code in action.py to work out if the connected device is one of the device supported by the BooxReaderApp additions. In the method "get_connected_device_primary_name", there is the following line:

Code:
device_name = self.connected_device.get_device_information()[0]
I believe this should be changed to:

Code:
device_name = self.connected_device.current_friendly_name
If you look at the code for "get_device_information" in two versions of driver.py for the MTP devices, that is what is being used there.

I have tested this here with my Android phone, and it does not fail. But, it isn't a device that will is expected to match the test. And for "friendly name", it is getting "David's S20 FE". That was set when I setup the phone, but, if the Boox devices can be configured in the same way, it could be a problem.
@davidfor, @tlwright, I've assembled a PR ( https://github.com/davidfor/calibre-annotations/pull/26 ) from the "Annotations-beta.zip" attached to the original post so that it won't be lost.
aik099 is offline   Reply With Quote
Old 05-25-2022, 01:47 AM   #1057
aik099
Enthusiast
aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!aik099 rocks like Gibraltar!
 
Posts: 33
Karma: 100180
Join Date: Apr 2020
Device: none
Quote:
Originally Posted by davidfor View Post
It is the word "página". Previously, it had a capital "P". I have added this, but, also changed the search to being case insensitive. The attached beta has the fix. I'll release it when I have confirmation that it works.
@davidfor, @ DenS, I've assembled a PR ( https://github.com/davidfor/calibre-annotations/pull/27 ) from the "Annotations-beta.zip" attached to the original post so that it won't be lost.
aik099 is offline   Reply With Quote
Old 05-31-2022, 05:40 AM   #1058
bm069au
Junior Member
bm069au began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2022
Device: KOBO Libra H20
Hi and thanks for reading my question. I am new to this and I have a problem no one seems to be able to solve. I own a Kobo Libra H20, and I manually imported a book onto the reader. Then I used annotation to proof read it. I went to export but Kobo as decided no no. So I found the .annot file and have it manually on my desktop. How do I import it as the book is not in my official Kobo library (I was proof reading pre publish). This is the content of the .annot file:
Spoiler:


<annotationSet xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://ns.adobe.com/digitaleditions/annotations">
<publication>
<dc:identifier>87455b40-88fb-4da3-a136-b70caf63ea04</dc:identifier>
<dc:title>Hunter's Dawn</dc:title>
<dc:creator>TJ Green</dc:creator>
<dc:language>en</dc:language>
</publication>
<annotation>
<dc:identifier>urn:uuid:2b007fde-3851-40fd-82e1-aca242c39f55</dc:identifier>
<dc:date>2022-05-15T02:52:31Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/wcvGy6k1Pj5WcjI6.xhtml#point(/1/4/1/1/2/1/122/1:3)" end="OEBPS/wcvGy6k1Pj5WcjI6.xhtml#point(/1/4/1/1/2/1/123/1:39)" progress="0.0789474">
<text>Agreed,” Shadow said, taking the photos from Estelle to study them. “We have no idea what surveillance systems are there. Once in and out is easiest.” Niel was pleased her relationship with </text>
</fragment>
</target>
<content>
<dc:date>2022-05-15T02:52:31Z</dc:date>
<text>Fix</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:7de72fbf-a983-4538-be91-2374597fcd66</dc:identifier>
<dc:date>2022-05-12T09:05:11Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/wcvGy6k1Pj5WcjI6.xhtml#point(/1/4/1/1/2/1/2/1:385)" end="OEBPS/wcvGy6k1Pj5WcjI6.xhtml#point(/1/4/1/1/2/1/4/1:3)" progress="0.0488722">
<text>However, Nahum hadn’t got time to indulge them. “Guys! We’re flying to Scotland in a couple of hours. We need to pack and get to the airport.” Ash</text>
</fragment>
</target>
<content>
<dc:date>2022-05-12T09:05:11Z</dc:date>
<text>Fix</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:c590e6ec-0892-42b3-be1f-52172db87359</dc:identifier>
<dc:date>2022-05-15T09:15:59Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/fq818UjGmLqa2cRj.xhtml#point(/1/4/1/1/2/1/90/1:154)" end="OEBPS/fq818UjGmLqa2cRj.xhtml#point(/1/4/1/1/2/1/91/1:84)" progress="0.12782">
<text>Gabe headed to the images that had caught his attention, but knew he needed to thank</text>
</fragment>
</target>
<content>
<dc:date>2022-05-15T09:15:59Z</dc:date>
<text>Moved</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:5a1cadc4-c6eb-4090-b5de-902555493cf6</dc:identifier>
<dc:date>2022-05-17T05:45:49Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/QknUj1ZieD5nQMvw.xhtml#point(/1/4/1/1/2/1/35/1:218)" end="OEBPS/QknUj1ZieD5nQMvw.xhtml#point(/1/4/1/1/2/1/38/1:132)" progress="0.229323">
<text>“How do you explain the large sums of money deposited in your account?” “I do private consultancy work.” “The please write down who you consult for, and we can confirm your story. It doesn’t completely explain the emails, though. You</text>
</fragment>
</target>
<content>
<dc:date>2022-05-17T05:45:49Z</dc:date>
<text>Fix</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:ac4e3917-6a6d-401a-8a56-3549e5cef3f5</dc:identifier>
<dc:date>2022-05-18T09:51:08Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/D5OPhE2trDhzXYdd.xhtml#point(/1/4/1/1/2/1/6/1:161)" end="OEBPS/D5OPhE2trDhzXYdd.xhtml#point(/1/4/1/1/2/1/6/1:295)" progress="0.263158">
<text>known Harlan for a long time. He knows when to bend the rules and when not to. He’s got good connections, and he likes the intrigue.</text>
</fragment>
</target>
<content>
<dc:date>2022-05-18T09:51:08Z</dc:date>
<text>And dush</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:c0bbb948-cdb5-4902-9f5d-604af427da06</dc:identifier>
<dc:date>2022-05-19T08:06:47Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/GhsEI9BQ0xpEBQel.xhtml#point(/1/4/1/1/2/1/21/1:87)" end="OEBPS/GhsEI9BQ0xpEBQel.xhtml#point(/1/4/1/1/2/1/23:0)" progress="0.300752">
<text>Shadow looked relaxed about it. “No problem. I have that black dress I borrowed from El. And the shoes. She told me I could keep them—a gift. And besides, Nahum said I looked sexy as hell in them.”</text>
</fragment>
</target>
<content>
<dc:date>2022-05-19T08:06:47Z</dc:date>
<text>Fix</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:3a6ce61c-0373-45c0-bbd7-cba922b76bbc</dc:identifier>
<dc:date>2022-05-24T02:52:22Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/HAXzuOFJZymqXhHd.xhtml#point(/1/4/1/1/2/1/21/1:205)" end="OEBPS/HAXzuOFJZymqXhHd.xhtml#point(/1/4/1/1/2/1/21/1:286)" progress="0.37218">
<text> dunes like a djinn. He nodded absently. “He survived…not surprisingly.” He</text>
</fragment>
</target>
<content>
<dc:date>2022-05-24T02:52:22Z</dc:date>
<text>Odd</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:0b3a39b5-fd25-4c8b-b21f-0b978fec77ba</dc:identifier>
<dc:date>2022-05-24T02:48:57Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/HAXzuOFJZymqXhHd.xhtml#point(/1/4/1/1/2/1/2/1:282)" end="OEBPS/HAXzuOFJZymqXhHd.xhtml#point(/1/4/1/1/2/1/4/1:4)" progress="0.368421">
<text>. Ignoring all the other objects, he strode towards it, aware of the others flanking him. Up close could see the cracks in the surface that indicated where it had broken into pieces and had been reconstructed. Gabe</text>
</fragment>
</target>
<content>
<dc:date>2022-05-24T02:48:57Z</dc:date>
<text>Fix</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:20874407-77b0-4f02-b0d1-47f61f4da520</dc:identifier>
<dc:date>2022-05-24T13:39:24Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/FkRclLA9fBBoxTZK.xhtml#point(/1/4/1/1/2/1/48/1:168)" end="OEBPS/FkRclLA9fBBoxTZK.xhtml#point(/1/4/1/1/2/1/49/1:3)" progress="0.5">
<text>and running to the door. “JD, my shotgun is my room. Do you have any weapons down here?” “</text>
</fragment>
</target>
<content>
<dc:date>2022-05-24T13:39:24Z</dc:date>
<text>Fix</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:b75d1a02-fed2-4a61-b053-0ec44da8ef80</dc:identifier>
<dc:date>2022-05-26T08:51:05Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/ZyG2kXeVNWMeO2la.xhtml#point(/1/4/1/1/2/1/51/1:307)" end="OEBPS/ZyG2kXeVNWMeO2la.xhtml#point(/1/4/1/1/2/1/53/1:41)" progress="0.567669">
<text>.” “So, what now?” Catarina asked, lifting her hair to allow her neck to cool as glanced down the crowded street. “We load the car up and join the others</text>
</fragment>
</target>
<content>
<dc:date>2022-05-26T08:51:05Z</dc:date>
<text>Missing she</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:d962f8de-4623-4de8-8ee1-9968f7549a15</dc:identifier>
<dc:date>2022-05-27T06:08:03Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/ompyvQrplJgj0mmO.xhtml#point(/1/4/1/1/2/1/44/1:159)" end="OEBPS/ompyvQrplJgj0mmO.xhtml#point(/1/4/1/1/2/1/45:0)" progress="0.597744">
<text> what you need—and that include logistics, like flights.”</text>
</fragment>
</target>
<content>
<dc:date>2022-05-27T06:08:03Z</dc:date>
<text>Need plural</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:9c31faaf-b205-492c-92f2-a96a67017bd6</dc:identifier>
<dc:date>2022-05-30T11:35:44Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/4Js3Fe2noijZ52Yu.xhtml#point(/1/4/1/1/2/1/77/1:121)" end="OEBPS/4Js3Fe2noijZ52Yu.xhtml#point(/1/4/1/1/2/1/78/1:34)" progress="0.800752">
<text>If Black Cronos overrun them and end up here, we’re all in trouble. I think we should go and see what’s happening.” “And leave the others locked up?</text>
</fragment>
</target>
<content>
<dc:date>2022-05-30T11:35:44Z</dc:date>
<text>Needs plural</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:ea77d652-225c-4b7d-9f13-eb47a30db381</dc:identifier>
<dc:date>2022-05-30T11:50:36Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/CHKEi1s9kOtKKQ8m.xhtml#point(/1/4/1/1/2/1/14/1:118)" end="OEBPS/CHKEi1s9kOtKKQ8m.xhtml#point(/1/4/1/1/2/1/15/1:80)" progress="0.823308">
<text>.” She had no idea if he could understand, and she hadn’t got time to hang around</text>
</fragment>
</target>
<content>
<dc:date>2022-05-30T11:50:36Z</dc:date>
<text>Grammer</text>
</content>
</annotation>
<annotation>
<dc:identifier>urn:uuid:b46510dc-2e20-4a04-aa2a-9d3f73d38d09</dc:identifier>
<dc:date>2022-05-30T11:56:38Z</dc:date>
<dc:creator>urn:uuid:d0919127-ada0-43e7-813d-2be63e9cec78</dc:creator>
<target>
<fragment start="OEBPS/CHKEi1s9kOtKKQ8m.xhtml#point(/1/4/1/1/2/1/39/2:277)" end="OEBPS/CHKEi1s9kOtKKQ8m.xhtml#point(/1/4/1/1/2/1/40/1:162)" progress="0.834586">
<text>ground. Niel grunted as he stood, pulling the knife free and swiping at the next soldier who raced at him. His sliced through his throat, and he too fell quickly. With no</text>
</fragment>
</target>
<content>
<dc:date>2022-05-30T11:56:38Z</dc:date>
<text>Fix</text>
</content>
</annotation>
</annotationSet>


I am not sure if I am having a "tired brain" day or if the info is not available. It would make my life a lot easier if I could import the .annot file direct from my Windows 10 pro, desktop, or from the ereader plugged in. Any help would be great.

Last edited by theducks; 06-14-2022 at 03:13 PM. Reason: spoilered
bm069au is offline   Reply With Quote
Old 06-14-2022, 03:10 PM   #1059
ptbates
Junior Member
ptbates began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura
I am using the plugin with Kobo and it reads the Annotations in the Kobo book and successfully syncs them to the Annotations column of the desktop copy in Calibre. Nice. But how does one concatenate those annotations with the Calibre reader's Bookmarks page? Is that even possible?
ptbates is offline   Reply With Quote
Old 06-14-2022, 10:57 PM   #1060
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: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by ptbates View Post
I am using the plugin with Kobo and it reads the Annotations in the Kobo book and successfully syncs them to the Annotations column of the desktop copy in Calibre. Nice. But how does one concatenate those annotations with the Calibre reader's Bookmarks page? Is that even possible?
You can't. It needs someone to write code to translate the locations from how the device does them to the way calibre does them and then to add the annotations. It is something that has been on my todo list for a while, but, I haven't gotten around to it. And, it isn't much of a priority for me, so I can't say when I will get to it.
davidfor is offline   Reply With Quote
Old 06-15-2022, 10:12 AM   #1061
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,094
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by davidfor View Post
You can't. It needs someone to write code to translate the locations from how the device does them to the way calibre does them and then to add the annotations. It is something that has been on my todo list for a while, but, I haven't gotten around to it. And, it isn't much of a priority for me, so I can't say when I will get to it.
There be Dragons.
Next we will want interoperability with other brands.
(who were these idjuts that wrote e-book standards, and left out so many things that REAL_USERS use, resulting in this midden heap of cross platform uniqueness?)

Actually, I would love a ebook-Editor GOTO (location) based on the Annotation (how I mark problems found while proofing)
theducks is offline   Reply With Quote
Old 06-15-2022, 10:56 PM   #1062
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: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by theducks View Post
There be Dragons.
Next we will want interoperability with other brands.
(who were these idjuts that wrote e-book standards, and left out so many things that REAL_USERS use, resulting in this midden heap of cross platform uniqueness?)
For Kobo devices, it won't be that hard for epubs. The location used by the RMSDK renderer is fairly easy to translate to what calibre uses. But, kepubs will be a harder. I think that anyway to do it will either be slow (might require opening the book and maybe running kepubification on the parts of the book with the annotations and then reversing that to the epub location id) or inaccurate (quick-and-dirty is to put all annotations on the first paragraph in the chapter they are in).

For other devices, it will depend on what can be found. The current method for Kindles means there is no accurate location. Maybe a search for the highlighted text can be done, but, that sounds hard and inaccurate. Tolino has the same problem.
Quote:
Actually, I would love a ebook-Editor GOTO (location) based on the Annotation (how I mark problems found while proofing)
Yes, using annotations when editing would be great. I mark errors when reading. If I could pull them back to calibre, see them when editing and navigate to the location, it would be very good.
davidfor is offline   Reply With Quote
Old 06-18-2022, 12:55 PM   #1063
Erithax
Junior Member
Erithax began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jun 2022
Device: none
Quote:
Originally Posted by davidfor View Post
You can't. It needs someone to write code to translate the locations from how the device does them to the way calibre does them and then to add the annotations. It is something that has been on my todo list for a while, but, I haven't gotten around to it. And, it isn't much of a priority for me, so I can't say when I will get to it.
I was thinking about trying to tackle this issue.

Do you know if it is possible to easily install a program on a Kobo reader to wirelessly transfer and receive data (e.g. text file) from it to a PC, via LAN? What about other brands?

It'll be hard justifying the work required, if it can't reach any appreciable technical depth (e.g. wireless transfers) and/or reach (e.g. easy install, supports many devices).
Erithax is offline   Reply With Quote
Old 06-19-2022, 04:23 AM   #1064
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: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Erithax View Post
I was thinking about trying to tackle this issue.

Do you know if it is possible to easily install a program on a Kobo reader to wirelessly transfer and receive data (e.g. text file) from it to a PC, via LAN? What about other brands?
I believe that KOReader implements the interface used by Calibre Companion and can access calibre wirelessly.
Quote:
It'll be hard justifying the work required, if it can't reach any appreciable technical depth (e.g. wireless transfers) and/or reach (e.g. easy install, supports many devices).
The issue for doing this generally is that each device or ereader app is different. How they store annotations is different and you would need to implement different code on each of the devices to extract them. Which is already a problem for the problem for the Annotations plugin. Code has to be written for each device/app and what can be done depends on what is stored and reachable when the device is connected.
davidfor is offline   Reply With Quote
Old 06-20-2022, 07:08 AM   #1065
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: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Huwaetzel View Post
Hi davidfor:

thank you for the quick turn around. This did solve the error "a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType"

The new error message looks different:

calibre, version 5.37.0
FEHLER: Unbehandelter Ausnahmefehler: <b>TypeError</b>:unsupported operand type(s) for *: 'NoneType' and 'int'

calibre 5.37 embedded-python: False is64bit: True
Linux-5.15.0-30-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.15.0-30-generic', '#31-Ubuntu SMP Thu May 5 10:00:34 UTC 2022')
Python 3.10.4
Interface language: de
Successfully initialized third party plugins: DeACSM (0, 0, 15) && DeDRM (7, 2, 1) && Annotations (1, 17, 3) && DNB_DE (3, 1, 7) && Favourites Menu (1, 1, 0) && Find Duplicates (1, 9, 5) && KOReader Sync (0, 2, 7) && Pocketbook Tools (0, 9, 5)
Traceback (most recent call last):
File "calibre_plugins.annotations.action", line 363, in fetch_usb_connected_device_annotations
self.fetch_usb_device_annotations(self.get_connect ed_device_primary_name())
File "calibre_plugins.annotations.action", line 407, in fetch_usb_device_annotations
annotated_book_list = self.get_annotated_books_on_usb_device(reader_app)
File "calibre_plugins.annotations.action", line 624, in get_annotated_books_on_usb_device
ra.get_active_annotations()
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 62, in get_active_annotations
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 344, in _fetch_annotations
File "/tmp/calibre_annotations_plugin/PocketBook.py", line 441, in _read_database_annotations
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
My apologies, but, I seem to have missed this post.

The error is again happening in an area I cannot test as I do not have the device. But, the error is happening where a value to be used for sorting is generated. This uses a page number that comes from what appears to be the link used for the location. When the error happens, there was no page number. I have put a simple workaround for this to use zero for the page number in this circumstance.

The attached beta has this plus another fix related to MTP devices. In a previous beta I fixed an issue with getting the name of the device. But, there was another place in the code this was used. This is also fixed.

This beta has these fixes and the changes from the betas since the last release. These are:
  • Fix: Use "current_friendly_name" for MTP devices. Now in two places!
  • Fix: Change regex used for Kindle "Clippings.txt" to case insensitive. Kindle set to pt_BR uses lower case version of strings.
  • Fix: PocketBook - If path or filename is null in the database, skip the book.
  • Fix: PocketBook - If page number is None, just use offset for sort location.

Please test and tell me how it goes. I'll try and release this officially at the end of the week.
Attached Files
File Type: zip Annotations-beta.zip (681.0 KB, 354 views)
davidfor is offline   Reply With Quote
Reply

Tags
sampleexportingapp


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 523 07-15-2025 06:45 PM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 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


All times are GMT -4. The time now is 02:10 PM.


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