Forums

Errors when running scheduled task

When running from console, everything works great, no errors. However, when I let it run as a scheduled task, I get the following:

Traceback (most recent call last): File "/home/*/reverb_process.py", line 34, in <module> import modules.BitsynchDB #library for db functions ImportError: No module named modules.BitsynchDB

Any ideas?

It's probably using a different version of Python to the one that you expect to run the scheduled task; the best solution is to change the scheduled command so that it specifies the Python interpreter -- that is, instead of running

/home/JackieBlue/something.py

...you schedule

python3.7 /home/JackieBlue/something.py

...replacing the 3.7 with the actual version of Python that you want to use, if it's different.

Thank you. I'll give that a try.

OK -- let us know how it goes.

Thank you. That was the issue.

Excellent, thanks for confirming!