Giter VIP home page Giter VIP logo

Comments (3)

cayennes avatar cayennes commented on August 10, 2024

Thanks for letting me know. I'll look into it soon; I hope it's an easy fix.

  • Cayenne

On Oct 17, 2013, at 7:49 PM, 22camels [email protected] wrote:

Hi,

After I installed the latest Anki updates 2.0.13 and 2.0.14, adding a new Kanji did not generate anything in the Diagram field and Kanji Colorizer: (re) generate all button overrode all my existing diagrams with blanks.

Checking my Anki media folder the .svg files were there, and indeed the correct .svg file was generated when I added the new Kanji, just it did not appear in the Diagram field.

Reverting back to 2.0.12 it works again.

I'm on Mac OS 10.8.5.

Kind regards,
22camels


Reply to this email directly or view it on GitHub.

from kanji-colorize.

cayennes avatar cayennes commented on August 10, 2024

I've had another report of this issue.

from kanji-colorize.

Gorfiend avatar Gorfiend commented on August 10, 2024

I had this problem too, and was able to figure out the source and a workaround.
changing this block:

    try:
        with open(filename,'w', encoding='utf-8') as file:
            file.write(kc.get_colored_svg(character))
            mw.col.media.addFile(os.path.abspath(filename))
            dst+='<img src="%s">' % filename
    except:
        print "file not found: "+filename+". Ignoring ..."

to this:

    try:
        with open(filename,'w', encoding='utf-8') as file:
            file.write(kc.get_colored_svg(character))
            dst+='<img src="%s">' % filename
            mw.col.media.addFile(os.path.abspath(filename))
    except:
        print "file not found: "+filename+". Ignoring ..."

makes it work. It seems
mw.col.media.addFile(os.path.abspath(filename))
is causing it to break out of the try block - not sure what it does, but doesn't appear to have any negative effects (I've never used it before now, so may be missing something)

from kanji-colorize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.