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

[BUG] 通过cli.py调用api时抛出AttributeError: 'NoneType' object has no attribute 'get'错误 #598

Closed
hzg0601 opened this issue Jun 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@hzg0601
Copy link
Collaborator

hzg0601 commented Jun 12, 2023

通过python cli.py start api --ip localhost --port 8001 命令调用api时,抛出:
AttributeError: 'NoneType' object has no attribute 'get'错误

@hzg0601 hzg0601 added the bug Something isn't working label Jun 12, 2023
@hzg0601
Copy link
Collaborator Author

hzg0601 commented Jun 12, 2023

这个错误是由于在调用 api_start之前需要先调用LoaderCheckPoint加载模型检查点,并传入加载检查点的参数,
理论上可以用click包进行包装,但过于繁琐,改动较大,
此处仍用parser包,并以models.loader.args.DEFAULT_ARGS的参数为默认参数
如有改动需要可以更改models.loader.args.DEFAULT_ARGS

@hzg0601 hzg0601 closed this as completed Jun 12, 2023
glide-the added a commit that referenced this issue Jun 12, 2023
修复[bug] #598 #601,解决通过cli.py启动api、cli失败的问题
修改cli_demo启动顺序的问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant