Skip to content

Syntax Highlighting for Code does not work on Windows 10 and Anki version 2.0.33 with default installation - wrong pygments folder location #8

@PiotrSobiegraj

Description

@PiotrSobiegraj

Hello,

after installation I receive this error info:

An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.addons", line 41, in loadAddons
File "c:\pyi\iu.py", line 436, in importHook
File "c:\pyi\iu.py", line 521, in doimport
File "C:\Users\Piotrek\Documents\Anki\addons\Syntax Highlighting for Code.py", line 2, in
import code_highlight_addon.code_highlight_addon
File "c:\pyi\iu.py", line 436, in importHook
File "c:\pyi\iu.py", line 521, in doimport
File "C:\Users\Piotrek\Documents\Anki\addons\code_highlight_addon\code_highlight_addon.py", line 221, in
from pygments import highlight
File "c:\pyi\iu.py", line 455, in importHook
ImportError: No module named pygments

It is caused by location of folder with pygments library. In my installation it's C:\Users\Piotrek\Documents\Anki\addons\code_highlight_addon\libs\pygments. Moving this folder one level up (C:\Users\Piotrek\Documents\Anki\addons\code_highlight_addon\pygments) does the job. Can you modify it's location by default?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions