# New to travis - script.py?

**URL:** <https://travis-ci.community/t/new-to-travis-script-py/1659>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [January 3, 2019, 10:11pm UTC](https://travis-ci.community/t/new-to-travis-script-py/1659 "2019-01-03T22:11:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DipperDolphin](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dipperdolphin/32/859_2.png) [@DipperDolphin](https://travis-ci.community/u/DipperDolphin)\
**Post date:** [January 3, 2019, 10:11pm UTC](https://travis-ci.community/t/new-to-travis-script-py/1659/1 "2019-01-03T22:11:36Z")

</div>

Is there an example script that I can use to simply run the script and warn me of traceback errors?

Just want travis to check prs and see if the submissions would cause any errors.

Thanks

---

<div class="post-metadata">

**Author:** ![ryan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/ryan/32/866_2.png) [@ryan](https://travis-ci.community/u/ryan)\
**Post date:** [January 3, 2019, 10:44pm UTC](https://travis-ci.community/t/new-to-travis-script-py/1659/2 "2019-01-03T22:44:13Z")

</div>

See my reply to your previous post:

> [@Cd into files and then install requirements?](https://travis-ci.community/t/cd-into-files-and-then-install-requirements/1622/5):
>
> You could try command substitution to assign the output to a bash variable and then use a if to check if it contains a particular string of text. OUT\_LOG=$(ci/scripts/test\_python\_module.sh) if [["$OUT\_LOG" == "\*traceback error\*"]]; then echo "traceback error detected" ; fi Another option would be redirecting the output (stdout and/or stderr) when running the script to a file, and using grep/sed to search the file for output indicating that there is a traceback error.

You could then use `exit 1` from the script and Travis will detect the bad exit code and mark the build as failed – of course, if the traceback error causes the testing process to exit with a non-zero exit status, then you can just make sure you’re running the command from the `script` section of your Travis config and then Travis will pick up the failed test and mark the build as failed.
