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

Boost.Python.ArgumentError: Python argument types in #7

Open
RA1LGUN opened this issue May 23, 2021 · 0 comments
Open

Boost.Python.ArgumentError: Python argument types in #7

RA1LGUN opened this issue May 23, 2021 · 0 comments

Comments

@RA1LGUN
Copy link

RA1LGUN commented May 23, 2021

问题类型

模型加载错误

出错场景

加载模型时,如:

代码片段

`Segmentor.load(r'C:\Users\Qiu\Code\GitHubProject\ltp_pj\ltp_data\cws.model')

with Segmentor(os.path.join(MODELDIR, "cws.model")) as s:`

如何复现这一错误

只需加载模型就会报错,报错内容:
Segmentor.load(r'C:\Users\Qiu\Code\GitHubProject\ltp_pj\ltp_data\cws.model') Traceback (most recent call last): File "<input>", line 1, in <module> Boost.Python.ArgumentError: Python argument types in Segmentor.load(str) did not match C++ signature: load(struct Segmentor {lvalue}, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)

Traceback (most recent call last): File "C:/Users/Qiu/Code/GitHubProject/ltp_pj/example.py", line 20, in <module> with Segmentor(os.path.join(MODELDIR, "cws.model")) as s: Boost.Python.ArgumentError: Python argument types in Segmentor.__init__(Segmentor, str) did not match C++ signature: __init__(struct _object * __ptr64)

运行环境

python 原生3.6版本
VC++ 2015
已安装boost库并设置了环境变量
模型MD5正确
能够使用ltp进行分词等操作

期望结果

修复bug

其他

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