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

Auto markdown crashes sometimes #5

Closed
jonathan-s opened this issue Jun 5, 2019 · 2 comments
Closed

Auto markdown crashes sometimes #5

jonathan-s opened this issue Jun 5, 2019 · 2 comments

Comments

@jonathan-s
Copy link

Anki 2.1.13 (3ba55990) Python 3.6.1 Qt 5.9.7 PyQt 5.9
Platform: Mac 10.11.6
Flags: frz=True ao=True sv=1
Add-ons possibly involved: Auto Markdown

Caught exception:
  File "aqt/webview.py", line 27, in cmd
  File "aqt/webview.py", line 87, in _onCmd
  File "aqt/webview.py", line 368, in _onBridgeCmd
  File "aqt/editor.py", line 288, in onBridgeCmd
  File "/Users/jonathan/Library/Application Support/Anki2/addons21/1030875226/editor.py", line 221, in onMarkdownToggle
    editor_instance.web.evalWithCallback("document.getElementById('f%s').innerHTML" % (field_id), onHtmlAvailable)
<class 'AttributeError'>: 'NoneType' object has no attribute 'evalWithCallback'
@JanSurft
Copy link
Contributor

JanSurft commented Jun 6, 2019

This issue might be fixed in the pull request I did... I added additional checks for None (if for some reason the editor_instance hadn't been set prior to the execution of the methods that need it)

@gregorrr
Copy link
Owner

This seems to be the same as #6

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

No branches or pull requests

3 participants