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

Fields lists undef #1

Closed
nbrr opened this issue Dec 23, 2017 · 1 comment
Closed

Fields lists undef #1

nbrr opened this issue Dec 23, 2017 · 1 comment
Assignees
Milestone

Comments

@nbrr
Copy link

nbrr commented Dec 23, 2017

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 jdlorimer self-assigned this Feb 17, 2018
@jdlorimer jdlorimer added the bug label Feb 17, 2018
@jdlorimer
Copy link
Owner

Sorry about that. I've corrected the variable names. Should be fixed now.

@jdlorimer jdlorimer added this to the v1.0 milestone Jan 21, 2019
mentheosis added a commit to mentheosis/chinese-text-scanner that referenced this issue Feb 8, 2020
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