Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anki broken with Python 3.9 #33278

Closed
Bikutoso opened this issue Oct 2, 2021 · 2 comments
Closed

Anki broken with Python 3.9 #33278

Bikutoso opened this issue Oct 2, 2021 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Bikutoso
Copy link
Contributor

Bikutoso commented Oct 2, 2021

System

  • xuname:
    Void 5.13.19_1 x86_64 GenuineIntel notuptodate rrrmFFFF
  • package:
    anki-2.1.15_4
    python3-3.9.7_1

Expected behavior

Entering an answer should show the result without any errors.

Actual behavior

Gives this error after entering an answer.

Caught exception:
  File "/usr/share/anki/aqt/webview.py", line 322, in handler
    cb(val)
  File "/usr/share/anki/aqt/reviewer.py", line 461, in _onTypedAnswer
    self._showAnswer()
  File "/usr/share/anki/aqt/reviewer.py", line 217, in _showAnswer
    a = self._mungeQA(a)
  File "/usr/share/anki/aqt/reviewer.py", line 156, in _mungeQA
    return self.typeAnsFilter(mungeQA(self.mw.col, buf))
  File "/usr/share/anki/aqt/reviewer.py", line 306, in typeAnsFilter
    return self.typeAnsAnswerFilter(buf)
  File "/usr/share/anki/aqt/reviewer.py", line 362, in typeAnsAnswerFilter
    cor = parser.unescape(cor)
<class 'AttributeError'>: 'HTMLParser' object has no attribute 'unescape'

Steps to reproduce the behavior

Enter an answer in any deck with new/due cards.

Additional Information

Someone has already reported this bug to Gentoo Linux, they have created a patch that does also work in Void.

@paper42 paper42 added bug Something isn't working good first issue Good for newcomers labels Oct 2, 2021
@ericonr
Copy link
Member

ericonr commented Oct 3, 2021

It's hacktoberfest, so opening a PR with the patch sounds like a great opportunity ;)

@Bikutoso
Copy link
Contributor Author

Bikutoso commented Oct 3, 2021

#33287
I think i did this correctly.

@paper42 paper42 closed this as completed Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants