zhon icon indicating copy to clipboard operation
zhon copied to clipboard

AttributeError: module 'zhon' has no attribute 'hanzi'

Open gaoxuezhao opened this issue 3 years ago • 2 comments

AttributeError: module 'zhon' has no attribute 'hanzi'

gaoxuezhao avatar Jun 05 '21 05:06 gaoxuezhao

same problem happened to me , i add import statment in the __init__.py file and fix it .

FILE: site-packages/zhon/__init__.py

CODE:

"""Provides constants used in Chinese text processing."""

__version__ = '1.1.5'

from . import hanzi
from . import pinyin
from . import zhuyin
from . import cedict

or you can use the way like this : https://github.com/tsroten/zhon/issues/28#issuecomment-359209823

coreylam avatar Jul 14 '21 09:07 coreylam

copy from somwhere. import zhon.hanzi or from zhon import hanzi

zuijiawoniu avatar Sep 10 '21 03:09 zuijiawoniu

copy from somwhere. import zhon.hanzi or from zhon import hanzi

copy from somwhere. import zhon.hanzi or from zhon import hanzi

it works ! thank you!!!

jiaohuix avatar Dec 13 '22 16:12 jiaohuix

This should be fixed as of v2.0.0. Thanks for reporting this!

tsroten avatar Jun 24 '23 20:06 tsroten