正在尝试从节点执行Python脚本。它到达端点并在本地运行良好,但是当我尝试从Heroku部署时,出现以下错误日志:
```
(None,)
```
我尝试在根目录的runtime.txt中设置Python运行时:
```
2018-10-10T01:00:14.689410+00:00 app[web.1]: events.js:183
2018-10-10T01:00:14.689416+00:00 app[web.1]: throw er; // Unhandled 'error' event
2018-10-10T01:00:14.689417+00:00 app[web.1]: ^
2018-10-10T01:00:14.689419+00:00 app[web.1]:
2018-10-10T01:00:14.689421+00:00 app[web.1]: Error: spawn python3.6 ENOENT
2018-10-10T01:00:14.689424+00:00 app[web.1]: at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
2018-10-10T01:00:14.689426+00:00 app[web.1]: at onErrorNT (internal/child_process.js:362:16)
2018-10-10T01:00:14.689428+00:00 app[web.1]: at _combinedTickCallback (internal/process/next_tick.js:139:11)
```
答案 0 :(得分:1)
要回答我自己的问题,原因是我需要将Python buildpack与NodeJS buildback一起添加。在此处讨论:https://stackoverflow.com/a/39947385/3268182