Found a new issue now - my test script, which connects to my MongoDB Atlas instance and inserts one document - it runs fine when I run it manually via python 3.6 console. When i run it as a scheduled task, it fails with the error below.
Any idea why I would get a different outcome when running as a scheduled task?
Traceback (most recent call last):
File "/home/julesjoseph/ReTweeter/daily-UserSummary.py", line 23, in <module>
result = db.followers.insert_one(dailyCountRecord).inserted_id
File "/usr/local/lib/python2.7/dist-packages/pymongo/collection.py", line 622, in insert_one
with self._socket_for_writes() as sock_info:
File "/usr/lib/python2.7/contextlib.py", line 17, in enter
File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 716, in _get_socket
server = self._get_topology().select_server(selector)
File "/usr/local/lib/python2.7/dist-packages/pymongo/topology.py", line 142, in select_server
File "/usr/local/lib/python2.7/dist-packages/pymongo/topology.py", line 118, in select_servers
pymongo.errors.ServerSelectionTimeoutError: No replica set members found yet