# Python script output not being displayed in Travis log leads to build timeout

**URL:** <https://travis-ci.community/t/python-script-output-not-being-displayed-in-travis-log-leads-to-build-timeout/3734>\
**Category:** Python\
**Created:** [June 14, 2019, 7:50pm UTC](https://travis-ci.community/t/python-script-output-not-being-displayed-in-travis-log-leads-to-build-timeout/3734 "2019-06-14T19:50:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gplayersv](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/gplayersv/32/1976_2.png) [@gplayersv](https://travis-ci.community/u/gplayersv)\
**Post date:** [June 14, 2019, 7:50pm UTC](https://travis-ci.community/t/python-script-output-not-being-displayed-in-travis-log-leads-to-build-timeout/3734/1 "2019-06-14T19:50:35Z")

</div>

Hello,

I have the following script section in my `.travis.yaml` file:

```auto
script:
  - verify-linter.sh &
  - build_all.sh &
  - build-image.sh &
  - build-installer.sh &
  - export PYTHONPATH=. && create_vms.py &
  - wait $(jobs -p)
  - run-tests.sh

```

**Issue 1:** For some reason the output of my `create_vms.py` script doesn’t get displayed in the build logs. If I debug the travis build running `travis_run_script`, the output gets displayed. If I directly run the script from a travis debug session the output gets displayed.  
**Issue 2:** That command (`create_vms.py`) fails (for non important reasons) and my `wait $(jobs -p)` command hangs, leading to 10 minutes of no output leading to travis ending the build. I have no idea why this happens.

Any input is appreciated.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [June 14, 2019, 9:05pm UTC](https://travis-ci.community/t/python-script-output-not-being-displayed-in-travis-log-leads-to-build-timeout/3734/2 "2019-06-14T21:05:40Z")

</div>

Please link to the build in question.

---

<div class="post-metadata">

**Author:** ![hugovk](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/hugovk/32/684_2.png) [@hugovk](https://travis-ci.community/u/hugovk)\
**Post date:** [June 15, 2019, 10:01am UTC](https://travis-ci.community/t/python-script-output-not-being-displayed-in-travis-log-leads-to-build-timeout/3734/3 "2019-06-15T10:01:51Z")

</div>

If you have `set -e` in .`travis.yml` or one of the scripts, and an error occurs, it can cause the script to stop immediately without displaying an error. See:

[https://docs.travis-ci.com/user/common-build-problems/#my-build-fails-unexpectedly](https://docs.travis-ci.com/user/common-build-problems/#my-build-fails-unexpectedly)

---

<div class="post-metadata">

**Author:** ![webknjaz](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/webknjaz/32/34_2.png) [@webknjaz](https://travis-ci.community/u/webknjaz)\
**Post date:** [July 2, 2019, 2:43pm UTC](https://travis-ci.community/t/python-script-output-not-being-displayed-in-travis-log-leads-to-build-timeout/3734/4 "2019-07-02T14:43:28Z")

</div>

It’s possible to email to the Travis CI support and ask them to enable debug on your repo. With that, you’d be able to connect to the actual VMs over ssh and troubleshoot  
that closer.
