4

Am trying to execute a Python script from node. It's hitting the endpoint, and runs fine locally but when I try deploy from Heroku, I get the following error log:

```

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)

```

I tried setting the Python runtime in runtime.txt in the root directory:

```

$ cat runtime.txt

python-3.6.0

```

1

1 Answer 1

3

To answer my own question, the reason was I needed to add the Python buildpack alongside the NodeJS buildback. Discussed here: https://stackoverflow.com/a/39947385/3268182

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.