You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed this package using pip per the github readme file. Then in my terminal prompt I ran: C:\Users\_my_path_to_input_file_> anki_deck_from_text '.\out_GCSE French Foundation Vocabulary and Higher Vocab List (2009).txt' gcse.apkg 'GCSE French Foundation Vocabulary and Higher Vocabulary List (2009/2019)' --card_model 'basic'
Note: I'm not sure if it's helpful, but I tried --card_model 'basic' and --card_model 'sound' with and without quotes both after the command and at the end.
Every-time I received the following error: TypeError: cannot unpack non-iterable NoneType object
My IDE showed the culprit to be in parse_input.py function: def question_answer_split(line, separator, marker): line = line.lstrip(marker) answer, question = line.split(separator) return question.strip(), answer.strip()
My environment is relatively fresh install of Windows 10 Pro 22H2. Please let me know if there's any more information that would prove helpful!
The text was updated successfully, but these errors were encountered:
Super sorry for the delay in answering! I hope my comment is still relevant...
From your description of the problem, I can't seem to figure out the problem.
It seems that answer, question = line.split(separator) is trying to unpack None. I tested all the possibilities that came to my mind and checked the docs and could not make line.split(separator) return None.
Can you try a few things:
Can you check that in all the lines of your .txt file that start with the marker (default is -) you have a separator (default is =) between word and translation (or definition)?
Can you try on a much smaller version of your file (just a few lines that follow the structure shown in the example) to see if it works then? If so, you can then progressively add more lines to troubleshoot the problematic line.
I understand if that's too much trouble, so if you feel comfortable sending me your file (or a modified version that still shows the same problem) I would be happy to troubleshoot it myself.
I installed this package using pip per the github readme file. Then in my terminal prompt I ran:
C:\Users\_my_path_to_input_file_> anki_deck_from_text '.\out_GCSE French Foundation Vocabulary and Higher Vocab List (2009).txt' gcse.apkg 'GCSE French Foundation Vocabulary and Higher Vocabulary List (2009/2019)' --card_model 'basic'
Note: I'm not sure if it's helpful, but I tried --card_model 'basic' and --card_model 'sound' with and without quotes both after the command and at the end.
Every-time I received the following error:
TypeError: cannot unpack non-iterable NoneType object
My IDE showed the culprit to be in parse_input.py function:
def question_answer_split(line, separator, marker): line = line.lstrip(marker) answer, question = line.split(separator) return question.strip(), answer.strip()
My environment is relatively fresh install of Windows 10 Pro 22H2. Please let me know if there's any more information that would prove helpful!
The text was updated successfully, but these errors were encountered: