【发布时间】:2021-09-08 11:35:08
【问题描述】:
在运行 setup.cfg 中定义的 console_script 入口点时,我收到以下错误。不知道为什么它抱怨位置参数。
start-prediction-engine
Traceback (most recent call last):
File "/usr/local/bin/start-prediction-engine", line 8, in <module>
sys.exit(app())
TypeError: __call__() missing 3 required positional arguments: 'scope', 'receive', and 'send'
这里是 setup.cfg 文件中的内容
[options.entry_points]
console_scripts =
start-prediction-engine = prediction_engine.prediction_engine:app
在文件 prediction_engine.py 中
if __name__ == "__main__":
uvicorn.run("prediction_engine:app", host="0.0.0.0", port=8888, reload=True, log_level="info")
【问题讨论】:
标签: python-3.x fastapi uvicorn