If no input file will show Error TypeError: expected str, bytes or os.PathLike object, not NoneType
But I want to show a warning to remind users to input files outside, how to do?
def get_xml_name():
args = sys.argv
if len(args) > 1 :
args = args[1]
strA = "".join(args)
return strA
inputfile = open(get_xml_name() , 'r')
TypeError: expected str, bytes or os.PathLike object, not NoneType