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

运行调试的一些问题 #12

Open
rexchoi1983 opened this issue Jun 7, 2019 · 1 comment
Open

运行调试的一些问题 #12

rexchoi1983 opened this issue Jun 7, 2019 · 1 comment

Comments

@rexchoi1983
Copy link

感谢作者的分享,但我在调试过程中发现一些问题,不知道是不是组件版本导致的:
1、sanicms\loggers.py
第58行data = fields.pop('args'),取出的data是tuple,导致下面data.update报错,这里我修改了一下,重新组成一个dict,原理上看这是在读取参数,因此只是给它一个独立的名字就算了。
tmp = fields.pop('args')
data = {'name': tmp[0]}

2、sanicms\server.py
也是第58行,
await service.register_service(app.config['PORT'])
而register_service有两个参数, host 和 port,这里需要加上port=app.config['PORT']

不知道这样的修改是否合适,望指教,谢谢!

@songcser
Copy link
Owner

日志部分可以根据传入的参数修改。服务注册部分可能有问题,需要加上port参数的

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