OK. I've made an attempt at a scheduled task to copy a file from my dropbox into my files here once a day. This works on my home laptop (from dropbox-> desktop folder). This is the code, and below it is the error message on the schedule task log that I am getting. I upgraded the dropbox as described above. Any suggestions?
import sys
import dropbox
from dropbox.files import WriteMode
from dropbox.exceptions import ApiError, AuthError
TOKEN = 'my_token'
pyanywherelocalfile = '/home/myusername/ishack/client_db.csv'
mydboxfile = '/client_db.csv'
def restore(rev=None):
dbx.files_download_to_file(pyanywherelocalfile, mydboxfile, rev)
if __name__ == '__main__':
# Check for an access token
dbx = dropbox.Dropbox(TOKEN)
if (len(TOKEN) == 0):
sys.exit("ERROR")
restore()
error log:
warrenfitzhenry: unable to open X server `' @ error/import.c/ImportImageCommand/368.
warrenfitzhenry: unable to open X server `' @ error/import.c/ImportImageCommand/368.
from: can't read /var/mail/dropbox.files
from: can't read /var/mail/dropbox.exceptions
/home/warrenfitzhenry/ishack/schedules/schedule1: line 6: TOKEN: command not found
/home/warrenfitzhenry/ishack/schedules/schedule1: line 9: pyanywherelocalfile: command not found
/home/warrenfitzhenry/ishack/schedules/schedule1: line 10: mydboxfile: command not found
/home/warrenfitzhenry/ishack/schedules/schedule1: line 12: syntax error near unexpected token `('
/home/warrenfitzhenry/ishack/schedules/schedule1: line 12: `def restore(rev=None):'
2016-11-21 06:58:11 -- Completed task, took 1.00 seconds, return code was 2.