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

Bulk Fill Error #177

Open
dynnamic opened this issue Jan 26, 2021 · 4 comments
Open

Bulk Fill Error #177

dynnamic opened this issue Jan 26, 2021 · 4 comments
Assignees
Labels
Milestone

Comments

@dynnamic
Copy link

Can't seem to get Bulk Fill to work.

Bulk Fill>> All gives me the follow error

Traceback (most recent call last):
File "/Users/xxxx/Library/Application Support/Anki2/addons21/1128979221/fill.py", line 96, in bulk_fill_all
'hanzi': get_hanzi(dict(note)),
File "/Users/xxxx/Library/Application Support/Anki2/addons21/1128979221/hanzi.py", line 52, in get_hanzi
return cleanup(get_first(config['fields']['hanzi'], note))
File "/Users/xxxx/Library/Application Support/Anki2/addons21/1128979221/util.py", line 69, in cleanup
raise ValueError(text)
ValueError: None

Could this be related to the fact that many of the cards have formatting from the previous rendition of the Chinese Support Addon?

Thanks

@jdlorimer jdlorimer self-assigned this Mar 25, 2021
@jdlorimer jdlorimer added the bug label Mar 25, 2021
@jdlorimer jdlorimer added this to the v1.0 milestone Mar 25, 2021
@jdlorimer
Copy link
Owner

I'm fairly confident I have this fixed in the current version, which will go up on AnkiWeb later today.

I'll leave this open in case you still have issues.

@joeminicucci
Copy link

@dynnamic Can you confirm if you are still experiencing issues?

@spolcyn
Copy link

spolcyn commented Nov 7, 2021

@joeminicucci I can confirm that I'm still experiencing this issue with Anki 2.1.44 and CSR v0142

spolcyn added a commit to spolcyn/chinese-support-redux that referenced this issue Nov 7, 2021
Previously, if there existed any notes in the target deck that didn't
have one of the hanzi fields, the `get_hanzi` step would fail as a
result of `cleanup` raising a `ValueError` if it received `text=None`.

This PR modifies the logic so that presence of a `hanzi` field is
verified before getting the `hanzi` itself.

It also modifies the behavior such that cards that do not have usages
filled are marked as failed. Otherwise, the user doesn't know why many
cards did not have usages filled.

Relevant to jdlorimer#177.
@spolcyn
Copy link

spolcyn commented Nov 7, 2021

@joeminicucci Added a PR that should fix this for usage (see #196)

spolcyn added a commit to spolcyn/chinese-support-redux that referenced this issue Nov 7, 2021
Previously, if there existed any notes in the target deck that didn't
have one of the hanzi fields, the `get_hanzi` step would fail as a
result of `cleanup` raising a `ValueError` if it received `text=None`.

This PR modifies the logic so that presence of a `hanzi` field is
verified before getting the `hanzi` itself.

It also modifies the behavior such that cards that do not have usages
filled are marked as failed. Otherwise, the user doesn't know why many
cards did not have usages filled.

Relevant to jdlorimer#177.
spolcyn added a commit to spolcyn/chinese-support-redux that referenced this issue Nov 7, 2021
Previously, if there existed any notes in the target deck that didn't
have one of the hanzi fields, the `get_hanzi` step would fail as a
result of `cleanup` raising a `ValueError` if it received `text=None`.

This PR modifies the logic so that presence of a `hanzi` field is
verified before getting the `hanzi` itself.

It also modifies the behavior such that cards that do not have usages
filled are marked as failed. Otherwise, the user doesn't know why many
cards did not have usages filled.

Relevant to jdlorimer#177.
spolcyn added a commit to spolcyn/chinese-support-redux that referenced this issue Nov 7, 2021
Previously, if there existed any notes in the target deck that didn't
have one of the hanzi fields, the `get_hanzi` step would fail as a
result of `cleanup` raising a `ValueError` if it received `text=None`.

This PR modifies the logic so that presence of a `hanzi` field is
verified before getting the `hanzi` itself.

It also modifies the behavior such that cards that do not have usages
filled are marked as failed. Otherwise, the user doesn't know why many
cards did not have usages filled.

Relevant to jdlorimer#177.
spolcyn added a commit to spolcyn/chinese-support-redux that referenced this issue Nov 7, 2021
Previously, if there existed any notes in the target deck that didn't
have one of the hanzi fields, the `get_hanzi` step would fail as a
result of `cleanup` raising a `ValueError` if it received `text=None`.

This PR modifies the logic so that presence of a `hanzi` field is
verified before getting the `hanzi` itself.

It also modifies the behavior such that cards that do not have usages
filled are marked as failed. Otherwise, the user doesn't know why many
cards did not have usages filled.

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

No branches or pull requests

4 participants