zhon
zhon copied to clipboard
AttributeError: module 'zhon' has no attribute 'hanzi'
AttributeError: module 'zhon' has no attribute 'hanzi'
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
copy from somwhere.
import zhon.hanzi or from zhon import hanzi
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!!!
This should be fixed as of v2.0.0. Thanks for reporting this!