Can't import with Anki 2.1.33 on Mac

When try to import, I got the error :
Import failed. Debugging info:
Traceback (most recent call last):
File “aqt/importing.py”, line 203, in on_done
File “concurrent/futures/_base.py”, line 432, in result
File “concurrent/futures/_base.py”, line 388, in __get_result
File “concurrent/futures/thread.py”, line 57, in run
File “anki/importing/noteimp.py”, line 82, in run
File “/Users/cma/Library/Application Support/Anki2/addons21/46741504/noteImporter.py”, line 56, in importNotes
n.fields[c] = html.escape(n.fields[c])
NameError: name ‘html’ is not defined

Seems to be missing a python module in the package ?

Thanks.

This is caused by this add-on.

I can import the html module without problems on Anki 2.1.33 on Windows. It could be missing on Mac though.

Enter the following in the debug console and see what you get:

import html

print(html.escape('&'))

If that works, maybe just put import html at the top of the noteImporter.py file of the offending add-on?

Also see https://faqs.ankiweb.net/when-problems-occur.html

1 Like