Error while Exporting AnkiDeck to PDF

Kapil Agrawal's Avatar

Kapil Agrawal

16 May, 2020 11:03 AM

Hello All,

As part of my MCAT preparation, I am using an existing Anki deck. In order to print out the same on paper, I am exporting the deck to PDF using the PDF Glossary Export addon (ob Anki v2). I am getting the below error. Can someone please assist. I understand that Anki2 support does not exist, though I am forced to go back to v2 as I am not aware of a similar functionality addin for v2.1. Your inputs will be deeply appreciated.

Traceback (most recent call last):
  File "aqt\exporting.py", line 116, in accept
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\exporter.py", line 274, in exportInto
    GlossaryExporter.exportInto(self, path)
  File "anki\exporting.py", line 19, in exportInto
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\exporter.py", line 190, in doExport
    self.writeExportFile(html, file)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\exporter.py", line 268, in writeExportFile
    path=self.media_path # required on Windows
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\document.py", line 97, in pisaDocument
    encoding, context=context, xml_output=xml_output)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\document.py", line 59, in pisaStory
    pisaParser(src, context, default_css, xhtml, encoding, xml_output)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 708, in pisaParser
    pisaLoop(document, context)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 648, in pisaLoop
    pisaLoop(node, context, path, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 593, in pisaLoop
    pisaLoop(nnode, context, path, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 593, in pisaLoop
    pisaLoop(nnode, context, path, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 593, in pisaLoop
    pisaLoop(nnode, context, path, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 593, in pisaLoop
    pisaLoop(nnode, context, path, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 593, in pisaLoop
    pisaLoop(nnode, context, path, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 593, in pisaLoop
    pisaLoop(nnode, context, path, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 593, in pisaLoop
    pisaLoop(nnode, context, path, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 593, in pisaLoop
    pisaLoop(nnode, context, path, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 477, in pisaLoop
    attr = pisaGetAttributes(context, node.tagName, node.attributes)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\parser.py", line 117, in pisaGetAttributes
    nv = c.getFile(nv)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\context.py", line 848, in getFile
    return getFile(name, relative or self.pathDirectory)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\util.py", line 673, in getFile
    file = pisaFileObject(*a, **kw)
  File "C:\Users\Kapil\AppData\Roaming\Anki2\addons\pdf_glossary\libs\xhtml2pdf\util.py", line 533, in __init__
    uri = uri.decode("utf-8")
  File "encodings\utf_8.py", line 16, in decode
UnicodeEncodeError: 'ascii' codec can't encode character u'’' in position 19: ordinal not in range(128)

Traceback (most recent call last):
  File "aqt\exporting.py", line 110, in accept
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'C:/Users/Kapil/Downloads/MCAT Material/Psychology and Sociology PS/premed95 Cubene Psych Decks/P_S 6B & 6C_ Making Sense of the Environment_Responding to the World.pdf'

  1. 1 Posted by addons_zz on 18 May, 2020 01:46 AM

    addons_zz's Avatar

    You could try opening an issue asking support for Anki 2.1 on https://github.com/glutanimate/pdf-glossary/issues

Comments are closed, but you can start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac