import ftplib import urllib2 import os import logging logger = logging.getLogger(\'ftpuploader\') hdlr = logging.FileHandler(\'ftplog.log\') formatter = logging.Form
for the future strugglers, in python 3.8.2(and maybe a few versions before that), the syntax is
except Attribute as e: print(e)