Quote:
Originally Posted by Huwaetzel
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.