View Single Post
Old 05-22-2020, 11:23 AM   #363
ArcensLay
Junior Member
ArcensLay began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2020
Device: Kindle 4
Hello all,

I got a problem with the Plugin which may be the result of the default python version change on my system. I'm running a Debian Bullseye ("Testing") which uses Python 3.7.7 as defaullt while before it was as far as I remember Python 2.X.

The Plugin did not show the icon on start which may be related to the previous posts. It simply did not load the plugin due to an error in the utilities.py file line 39

Code:
print debug_text
which causes Python to throw an error due to the missing brackets. I changed it to

Code:
print (debug_text)
After this the plugin was shown in my calibre again. I guess this should be an easy fix as python 2 also supports this version of print as far as I remember.

Then I tried to change some plugin settings which resulted in an error (happens on any window as far as I could concern)

Code:
ERROR: Unhandled exception: <b>AttributeError</b>:'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "calibre_plugins.kindle_collections.ui", line 152, in preview_kindle_collections
  File "calibre_plugins.kindle_collections.ui", line 196, in show_version
  File "calibre_plugins.kindle_collections.utilities", line 38, in debug_print
AttributeError: 'str' object has no attribute 'decode'
If I commented those line out (as it clearly was only related to decoding the debug output which did not need decoding) I tried again and ran into the following error

Code:
Traceback (most recent call last):
  File "calibre_plugins.kindle_collections.customize", line 365, in kindle_model_changed
TypeError: '>=' not supported between instances of 'NoneType' and 'int'
I am not sure why this happens but I saw it was related to version detection of Kindle Touch and Paperwhite (which I don't use) so I thought I could try to circumvent it for the moment to get it working at least.

So I comment those lines (L 365 to 370 in customize.py) out the plugin shows the windows again.

Now I changed one value in the configuration window and closed/saved it which results in another Error Popup

Code:
ERROR: Kindle Collections: Not saving customizations due to unexpected errors.
This happens in customize.py line 388 as far as I could conclude as this line seems to kill the try block.

Code:
if not cfg.validate_configuration(self.get_custom_window_table_data(), self.get_custom_window_ignore_all()):
I think the problem is with getting the table data but I did not want to muddle through any more than I already did and decided to report the problem here.

Does anybody know how to proceed?

My System Info
Spoiler:

Debian "Bullseye" adm64
GNOME Version: 3.36.2
Windowing System: Wayland

calibre 4.99.5 embedded-python: False is64bit: True
Linux-5.6.0-1-amd64-x86_64-with-glibc2.29 Linux ('64bit', 'ELF')
('Linux', '5.6.0-1-amd64', '#1 SMP Debian 5.6.7-1 (2020-04-29)')
Python 3.8.3
Interface language: None
Successfully initialized third party plugins: Kindle Collections (1, 7, 24)
ArcensLay is offline   Reply With Quote