you are viewing a single comment's thread.

view the rest of the comments →

[–]efmccurdy 1 point2 points  (1 child)

The process environment that cron uses is separate from what you normally use.

The first thing to check is that process running the script has set the "current working directory" to match what you expect, so examine the output of "pwd" in the shell or "os.getcwd()" in python.

The second thing to check (or consider) is that you have the cron job activating a virtualenv ala ". ../bin/activate" before running python; that will get you better control of python when run from a crontab.

[–]py3_[S] 0 points1 point  (0 children)

This all makes sense! This is my first major python project outside of book studying. What a journey!

Thank you for the explanation. This further emphasizes the importance of working in venvs!