Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config文件名错误 #2

Open
Lin-Xuan-Margatroid opened this issue Jan 10, 2024 · 0 comments
Open

config文件名错误 #2

Lin-Xuan-Margatroid opened this issue Jan 10, 2024 · 0 comments

Comments

@Lin-Xuan-Margatroid
Copy link

Python 3.12.1,opencc-python-reimplemented 0.1.7
报错为

FileNotFoundError: [Errno 2] No such file or directory: 'lib/python3.12/site-packages/opencc/config/s2t.json.json'

查看代码错误原因是config行多拼接了一个json

select_lang_json = ['s2t.json', 't2s', 's2tw.json', 'tw2s.json', 's2hk.json', 'hk2s.json', 's2twp.json', 'tw2sp.json', 't2tw.json', 'hk2t.json', 't2hk.json', 't2jp.json', 'jp2t.json', 'tw2t.json', ]

可能是由于opencc-python-reimplemented实现与opnecc不一致或版本更新变化导致的。
默认pip install opencc会依赖系统的libopencc文件,使用opencc-python-reimplemented这个版本可以减少依赖的数量。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant