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

打包运行后出现如下错误 #56

Open
asian3 opened this issue Jul 1, 2021 · 1 comment
Open

打包运行后出现如下错误 #56

asian3 opened this issue Jul 1, 2021 · 1 comment

Comments

@asian3
Copy link

asian3 commented Jul 1, 2021

Traceback (most recent call last):
File "Area.py", line 534, in
File "xpinyin_init_.py", line 60, in init
File "pathlib.py", line 1175, in read_text
File "pathlib.py", line 1162, in open
File "pathlib.py", line 1016, in _opener
File "pathlib.py", line 388, in wrapped
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\surface\AppData\Local\Temp\_MEI10162\Mandarin.dat'

@nigexiaozhazha
Copy link

nigexiaozhazha commented Sep 14, 2024

打包出错的话,将【xpinyin】下的Mandarin.dat改为,[Mandarin.json](需手动修改,代码自己写,就是文本转json)
然后将__init__.py下的 57行注释(不需要):
data_path = Path(file).resolve().with_name('Mandarin.json')
__init__函数改为:

def __init__(self) -> None:
    self.pinyins = {
"3400": "QIU1",
"3401": "TIAN3 TIAN4",
"3404": "KUA4",
"3405": "WU3",
"3406": "YIN3",
"340C": "SI4 YI2",
。。。
。。。

自己补全

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

2 participants