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

Bug: AssertionError in lookup_all_words when processing JSON dictionary #9

Open
PsychoThinker opened this issue Dec 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@PsychoThinker
Copy link

Describe the bug

After specifying a dictionary file in JSON format (a bilingual Apple dictionary) and running the command gogadget anki-deck -i ..., I encounter the following error:

tools\gogadget\Lib\site-packages\gogadget\lookup.py", line 23, in lookup_all_words  
    assert isinstance(entries, list)  
           ^^^^^^^^^^^^^^^^^^^^^^^^^  
AssertionError

Expected behavior

I expected the program to successfully process the dictionary file or provide a clear error message indicating what is wrong with the input format.

Configuration:

  • OS: Windows 10
  • Using: CPU processing
  • Version of gogadget: v0.3.1

Additional context

I believe this issue could be mitigated by including an example of a dictionary file in the accepted format in the documentation.

@PsychoThinker PsychoThinker added the bug Something isn't working label Dec 27, 2024
@jonathanfox5
Copy link
Owner

You will be pleased to know that this is on my todo list.

Are you able to provide me a copy of the dictionary (or just an extract of the file) so that I can double check that your specific case works?

@PsychoThinker
Copy link
Author

I tried to reproduce the result from your tutorial video with all those Spanish dictionaries (from "Apple Dictionaries, 41 dictionaries, some bilingual"):

Spanish.json.bz2
Spanish - No Examples.json.bz2
Spanish - English - No Examples.json.bz2
Spanish - English.json.bz2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants