Forums

Program not running in console same as in task

This is what the console returns:

-----------------------------New tweet preparing-----------------------------

Sending: Hey there @XSevendead ! This bot detected that you are sad based off of one of your tweets! Here's a joke!

and this is what the task returns:

-----------------------------New tweet preparing-----------------------------
Traceback (most recent call last):
  File "/home/RedPenguin/apiexperiments/tweet-search.py", line 19, in <module>
    f = open('reddit_jokes.json')
FileNotFoundError: [Errno 2] No such file or directory: 'reddit_jokes.json'

Why isn't the task finding my external files?

Try providing the absolute path for the file that is to be opened.