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

报错信息“ Binary file has size 21086208 but the headers say it should be at least 2953349384)” #389

Closed
Gaia-Wu opened this issue May 9, 2023 · 5 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@Gaia-Wu
Copy link

Gaia-Wu commented May 9, 2023

在此之前是可以成功运行的
截屏2023-05-09 09 39 14
我重新下载了文件还是不行
请问有解决办法吗

@Gaia-Wu Gaia-Wu added the question Further information is requested label May 9, 2023
@Gaia-Wu
Copy link
Author

Gaia-Wu commented May 9, 2023

貌似是因为我使用的本地模型路径没有生效?
截屏2023-05-09 10 54 28
运行的时候却出现:
截屏2023-05-09 10 54 58
提问:
模型路径一定需要放在‘~/.pycorrector/datasets/’下才可以嘛?

@Yazooliu
Copy link

Yazooliu commented May 9, 2023

源码里面应该可以追踪到路径配置信息

@Yazooliu
Copy link

Yazooliu commented May 9, 2023

貌似是因为我使用的本地模型路径没有生效? 截屏2023-05-09 10 54 28 运行的时候却出现: 截屏2023-05-09 10 54 58 提问: 模型路径一定需要放在‘~/.pycorrector/datasets/’下才可以嘛?

代码里看是的

-----用户目录,存储模型文件-----

USER_DATA_DIR = os.path.expanduser('~/.pycorrector/datasets/')
os.makedirs(USER_DATA_DIR, exist_ok=True)
language_model_path = os.path.join(USER_DATA_DIR, 'zh_giga.no_cna_cmn.prune01244.klm')

Copy link

stale bot commented Dec 27, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.(由于长期不活动,机器人自动关闭此问题,如果需要欢迎提问)

@stale stale bot added the wontfix This will not be worked on label Dec 27, 2023
shibing624 added a commit that referenced this issue Mar 20, 2024
@shibing624
Copy link
Owner

updated. 可以用

import os
os.environ["PYCORRECTOR_DATA_DIR"] = "/your_new_path/"

改变默认的模型路径 ~/.pycorrector/datasets//your_new_path/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants