Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Exception filling missing fields #3

Closed
fultonm opened this issue Jan 20, 2018 · 2 comments
Closed

Exception filling missing fields #3

fultonm opened this issue Jan 20, 2018 · 2 comments
Assignees
Milestone

Comments

@fultonm
Copy link

fultonm commented Jan 20, 2018

Mac Version:
10.13.2 (17C205)

Anki 2.1.0beta32 Python 3.6.1 Qt 5.9.2 PyQt 5.9
Platform: Mac 10.13.2
Flags: frz=True ao=True

Caught exception:
File "/Users/michaelfulton/Library/Application Support/Anki2/addons21/839350950/fill_missing.py", line 267, in fill_simp_trad
if (has_field(Simplified_fields, note_dict) or has_field(Traditional_fields, note_dict)) and has_field(Hanzi_fields, note_dict):
<class 'NameError'>: name 'Simplified_fields' is not defined

@fultonm
Copy link
Author

fultonm commented Jan 20, 2018

I solved this by hardcoding these fields in fill_missing.py like this:

Simplified_fields = ['Simplified']
Traditional_fields = ['Traditional']
Pinyin_fields = ['Pinyin']
Meaning_fields = ['Meaning']
Hanzi_fields = ['Hanzi']
Alternate_fields = ['Alternate']
English_fields = ['English']
Sound_fields = ['Sound']
Color_fields = ['Color']

@jdlorimer jdlorimer self-assigned this Feb 17, 2018
@jdlorimer jdlorimer added the bug label Feb 17, 2018
@jdlorimer
Copy link
Owner

Thanks. This should be fixed now.

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

No branches or pull requests

2 participants