Hi Guys,
I am trying to upload an image to my server using Python:
Function:
Function Usage:
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
I am trying to upload an image to my server using Python:
Function:
1 2 3 4 5 6 7 |
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() |
1 |
upload_image( "screenshots\failed\4-site.com-1557162721.5269995.png" , "4-site.com-1557162721.5269995.png" ) |
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