skozlovf/anki_deck

TypeError: sequence item 2: expected str instance, NoneType found

Opened this issue · 0 comments

I have tried the script on a few dictionaries from https://sourceforge.net/projects/xdxf/

I run the script as anki-deck -d Documenten/English_French/dict.xdxf -w words-test.txt txt

I always get the following error:

Traceback (most recent call last):
  File "/home/jeroen/.local/bin//anki-deck", line 11, in <module>
    load_entry_point('anki-deck==0.0.1', 'console_scripts', 'anki-deck')()
  File "/usr/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/jeroen/.local/lib/python3.8/site-packages/anki_deck-0.0.1-py3.8.egg/anki_deck/cli.py", line 50, in txt
  File "/home/jeroen/.local/lib/python3.8/site-packages/anki_deck-0.0.1-py3.8.egg/anki_deck/parser.py", line 192, in get_cards
  File "/home/jeroen/.local/lib/python3.8/site-packages/anki_deck-0.0.1-py3.8.egg/anki_deck/flashcards.py", line 57, in handle
TypeError: sequence item 2: expected str instance, NoneType found