Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when selecting Lemma/Gloss in "Customize Kindle Word Wise" #136

Closed
3 tasks done
mizake-mizan opened this issue Jul 4, 2023 · 6 comments
Closed
3 tasks done

Comments

@mizake-mizan
Copy link

Checkboxes

  • I have read the document at xxyzz.github.io/WordDumb.
  • I have not found similar issue or disscussion at GitHub.
  • Reboot doesn't fix the problem.

Describe the bug

ERROR: Unhandled exception: AttributeError:'QDialog' object has no attribute 'device_manager'
when selecting "Lemma: English/Gloss: Chinese"
(does not occur with other combinations)

System Information

Windows 11
Calibre 6.22

Error message

calibre, version 6.22.0
ERROR: Unhandled exception: <b>AttributeError</b>:'QDialog' object has no attribute 'device_manager'

calibre 6.22  embedded-python: True
Windows-10-10.0.23493-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.23493')
Python 3.10.1
Windows: ('10', '10.0.23493', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 1, 0) && DeDRM (10, 0, 5) && Package KFX (from KFX Input) (2, 1, 0) && Count Pages (1, 13, 0) && Ebook Translator (2, 0, 3) && EpubMerge (2, 15, 0) && EpubSplit (3, 6, 0) && Extract ISBN (1, 6, 0) && KFX metadata reader (from KFX Input) (2, 1, 0) && KFX Input (2, 1, 0) && Set KFX metadata (from KFX Output) (2, 0, 0) && KFX Output (2, 0, 0) && Kindle hi-res covers (0, 5, 0) && Modify ePub (1, 8, 1) && Obok DeDRM (10, 0, 3) && Quality Check (1, 13, 4) && WordDumb (3, 29, 3)
Traceback (most recent call last):
  File "calibre_plugins.worddumb.config", line 261, in open_choose_lemma_lang_dialog
  File "calibre_plugins.worddumb.custom_lemmas", line 67, in __init__
  File "calibre_plugins.worddumb.custom_lemmas", line 83, in init_sql_table
  File "calibre_plugins.worddumb.custom_lemmas", line 213, in check_empty_kindle_gloss
  File "calibre_plugins.worddumb.send_file", line 192, in device_connected
AttributeError: 'QDialog' object has no attribute 'device_manager'

Reproduce steps

  1. Select "Preferences"
  2. Select "Customize Kindle Word Wise"
  3. Choose Lemma: English / Gloss: Chinese
  4. Hit "OK"

Screenshots or videos

No response

@mizake-mizan
Copy link
Author

Note: A Kindle device is attached while running this operation.

@xxyzz
Copy link
Owner

xxyzz commented Jul 5, 2023

There is nothing special about this language combination and I can't reproduce this error. Sorry, I genuinely don't know why this error happens.

@mizake-mizan
Copy link
Author

Thanks for checking, I'll fiddle around further, it's probably my setup.
Incidentally, what is the actual difference between selecting "Chinese" or "Simplified Chinese" as the gloss language -- I assume one is using the Kindle default definitions file and the other is pulling from Wiktionary? Or is there something more?

@mizake-mizan
Copy link
Author

Second question:

Set Word Wise language to Chinese on Kindle to view Wiktionary definition. WordDumb replaces the original Chinese Kindle Word Wise database file when the “Use Wiktionary defination” option is enabled for English books or creating Word Wise for non-English books.

Is the original database file overwritten, or still available? In other words, if I switch back and forth between a few languages, do I need to consider restoring the original Chinese file? Does the approach you have taken even support using two different Word Wise language pairs/dictionaries at the same time?

@xxyzz
Copy link
Owner

xxyzz commented Jul 6, 2023

"Chinese" are "Simplified Chinese" are the same if you don't enable "use Wiktionary definition", but if you enable this option, the gloss will be in different Chinese characters.

The Word Wise database file on Kindle will be overwritten. If you enable "use Wiktionary definition", new database file will be copied to Kindle if the previous database is in a different language. The Kindle's default db have to be restored manually.

@mizake-mizan
Copy link
Author

That'll help me figure out what is happening -- can close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants