Here is the script:
import fmeobjects
import ftplib
import os
import glob
# FTP Section
print 'Connecting to FTP Site...'
# Connect to FTP site
s = ftplib.FTP('ftpsite','city@ftpsite','password')
# Point to file to send
f = open('Z:\\DataExport\\FME\\Other_Exports\\Export\\REALTY_LISTINGS_DATA_test.SQL','r')
# Send the file to FTP site
print 'Sending file...'
s.storbinary('REALTY_LISTINGS_DATA_test.SQL', f)
print 'Finished Sending file.'
# Close file and FTP connection
f.close()
s.quit()
I'm getting the following error, why?
Python Exception <error_perm>: 500 ?
Error executing string `import fmeobjects
I am assuming Python is installed with FME. Do I have to do something else to make this work. Never used Python before. Copied most of this from a sample.
Thanks.