Fields lists undef
Closed this issue · 1 comments
nbrr commented
Fill incomplete notes -> Fill simplified/traditional
Debug info:
Anki 2.1.0beta24 Python 3.6.3 Qt 5.10.0 PyQt 5.9.2
Platform: Linux
Flags: frz=False ao=True
Caught exception:
File "/home/nbrr/.local/share/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
Simplified_fields and similar used to be defined in edit_behavior.py in the older version of the addon that is still on my disc, it is no longer present anywhere in the new version's files.
Attempted to copy the definitions from the old to the new edit_behavior.py file, got this error
Caught exception:
File "/home/nbrr/.local/share/Anki2/addons21/839350950/fill_missing.py", line 290, in fill_simp_trad
note.flush()
File "/usr/share/anki/anki/notes.py", line 51, in flush
fields = self.joinedFields()
File "/usr/share/anki/anki/notes.py", line 69, in joinedFields
return joinFields(self.fields)
File "/usr/share/anki/anki/utils.py", line 256, in joinFields
return "\x1f".join(list)
<class 'TypeError'>: sequence item 7: expected str instance, NoneType found
jdlorimer commented
Sorry about that. I've corrected the variable names. Should be fixed now.