xxyzz / WordDumb

A calibre plugin that generates Kindle Word Wise and X-Ray files for KFX, AZW3, MOBI and EPUB eBook.
https://xxyzz.github.io/WordDumb/
GNU General Public License v3.0
386 stars 19 forks source link

getting error while creating word wise and sending to android #86

Closed ghost closed 2 years ago

ghost commented 2 years ago

Checkboxes

Describe the bug

getting error

System Information

windows 10 calibre 6.80 64bit python 3.10 plugin - 3.26.1

Error message

calibre, version 6.8.0
ERROR: Unhandled exception: <b>TypeError</b>:SendFile.push_files_to_android() missing 1 required positional argument: 'package_name'

calibre 6.8  embedded-python: True
Windows-10-10.0.19043-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19043')
Python 3.10.1
Windows: ('10', '10.0.19043', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 49, 0) && Package KFX (from KFX Input) (1, 49, 0) && Count Pages (1, 12, 0) && Goodreads (1, 7, 1) && Goodreads Sync (1, 16, 2) && KFX metadata reader (from KFX Input) (1, 49, 0) && KFX Input (1, 49, 0) && Set KFX metadata (from KFX Output) (1, 64, 0) && KFX Output (1, 64, 0) && Quality Check (1, 13, 2) && WordDumb (3, 25, 0)
Traceback (most recent call last):
  File "calibre\gui2\__init__.py", line 720, in dispatch
  File "calibre_plugins.worddumb.ui", line 142, in done
  File "calibre_plugins.worddumb.send_file", line 43, in send_files
TypeError: SendFile.push_files_to_android() missing 1 required positional argument: 'package_name'

Reproduce steps

  1. connect android via adb and allow file transfer
  2. select a book
  3. click on create word wise

Screenshots or videos

No response

ghost commented 2 years ago

note: my phone doesn't have rooted debugging option

xxyzz commented 2 years ago

You're using an older version 3.25.0, the error you posted was fixed in 3.26.0, update to the latest version will solve this error.

Only sending Word Wise file requires root permission, you can still use this plugin to send X-Ray file or move the generated Word Wise file manually if your phone is rooted.

Rooted debugging is only enabled on eng and userdebug build ROM like LineageOS.

ghost commented 2 years ago

You're using an older version 3.25.0, the error you posted was fixed in 3.26.0, update to the latest version will solve this error.

Only sending Word Wise file requires root permission, you can still use this plugin to send X-Ray file or move the generated Word Wise file manually if your phone is rooted.

Rooted debugging is only enabled on eng and userdebug build ROM like LineageOS.

so, i must have rooted debugging for word wise to work?

ghost commented 2 years ago

tried with 3.26 and gave me this error

calibre, version 6.8.0 (win32, embedded-python: True) adb failed:

Traceback (most recent call last): File "calibre_plugins.worddumb.send_file", line 44, in send_files File "calibre_plugins.worddumb.send_file", line 123, in push_files_to_android File "calibre_plugins.worddumb.utils", line 47, in run_subprocess File "subprocess.py", line 524, in run subprocess.CalledProcessError: Command '['D:\Downloads\platform-tools\adb.EXE', 'push', WindowsPath('D:/Books/George R. R. Martin/A Game of Thrones (1)/LanguageLayer.en.B000QCS8TW.kll'), '/data/data/com.amazon.kindle/databases/WordWise.en.B000QCS8TW.CR_RVR1U68Z34GNDVSO4TN0G9E4CA6D.db']' returned non-zero exit status 1.

xxyzz commented 2 years ago

Sending Word Wise file to Android requires root permission, you can flash a ROM has that option. Or root you phone then move the file manually, both source and destination file paths are in the error message you just posted.

ghost commented 2 years ago

thanks for the quick reply. i don't think i will be rooting my phone. Also, i'm buying a device for reading books and given the features of kfx files, i will likely to be using it for reading my books. i have these devices in mind:

  1. Kindle fire hd 10 2021 (does the wise file require root on this model also or does it work just like kindle e ink devices?)
  2. Realme pad (i wanted this because it had an sd card reader, but given the root requirement for this tool, i won't be buying it)
  3. Kindle paperwhite 11th gen. 16GB (does the goodreads integration work with kfx files? i tried sending kfx files to my android to /android/data/com.amazon.kindle/files . the files showed up and it had the right page numbers as from the count pages plugin but no goodreads integration. By goodreads integration i mean the "About this book" from the 3 dot menu on the kindle android app)

you can close this issue now :)

xxyzz commented 2 years ago

I don't own Kindle fire device so I don't know whether it requires root or not. I only know the Kindle Android app requires root permission to move Word Wise file.

Goodreads probably needs a valid ASIN metadata in the book file. Currently this plugin adds a random invalid ASIN to the book if the book doesn't have one.