I am using Python Anywhere to run a scheduled task. I have written the script and tested it running from the file and it works fine. However, if I used a scheduled task I get an error message.
Traceback (most recent call last):
File "/home/myaccount/myfile.py", line 45, in <module>
activeData = shelve.open('activeData')
File "/usr/lib/python2.7/shelve.py", line 243, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 227, in __init__
Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
File "/usr/lib/python2.7/anydbm.py", line 84, in open
mod = __import__(result)
ImportError: No module named gdbm
I'm confused as to why the script runs fine if I run it from the script, but fails when triggered from the scheduled tasks, and why this would produce a missing module.
Any help appreciated.