Code Monkey home page Code Monkey logo

hanzipy's People

Contributors

alxdrdelaporte avatar chaudhga avatar synkied avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hanzipy's Issues

turn off DEBUG logging

it seems like one of the dependencies enables DEBUG logging. is there a way to prevent this?

UnicodeDecodeError when initializing HanziDecomposer

When I try to initialize HanziDecomposer, I get a UnicodeDecodeError. The error seems to stem from the init_decomposition() method when it tries to load a JSON file. Here's the traceback:

Traceback (most recent call last):
File "C:\MyPC\MyProject\HanziPyTest.py.py", line 12, in
decomposer = HanziDecomposer()
File "C:\MyPC\MyProject\venv\lib\site-packages\hanzipy\decomposer.py", line 23, in init
self.init_decomposition()
File "C:\MyPC\MyProject\venv\lib\site-packages\hanzipy\decomposer.py", line 52, in init_decomposition
self.radicals = json.load(radicals_file)
File "C:\MyPC\AppData\Local\Programs\Python\Python39\lib\json_init_.py", line 293, in load
return loads(fp.read(),
File "C:\MyPC\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 728: character maps to

Environment:

  • OS: Windows11
  • Python version: Python 3.9
  • hanzipy version: 1.0.3

Steps to Reproduce:
Here's a minimal code snippet that reproduces the error:

from hanzipy import HanziDecomposer
decomposer = HanziDecomposer()

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.