May-06-2019, 07:51 PM
Hi Guys,
I am trying to upload an image to my server using Python:
Function:
From what i have been reading the error is caused because i'm comparing a string to an int, but i don't compare strings anywhere in the code, can anyone see anything abvious i have missed?
cheers guys
Graham
I am trying to upload an image to my server using Python:
Function:
def upload_image(image_location, image_name_only): ftp_client = ftplib.FTP('site.com') ftp_client.connect('user', 'pass') file = open(image_location, 'rb') ftp_client.storbinary('STOR /home/admin/web/site.com/public_html/images/screenshots/' + image_name_only, file) file.close() ftp_client.quit()Function Usage:
upload_image("screenshots\failed\4-site.com-1557162721.5269995.png", "4-site.com-1557162721.5269995.png")Currently the error is: '>' not supported between instances of 'str' and 'int'
From what i have been reading the error is caused because i'm comparing a string to an int, but i don't compare strings anywhere in the code, can anyone see anything abvious i have missed?
cheers guys
Graham