def read_data(from_file):
file1 = open(from_file, "r")
with open(file1) as f:
for line in f:
print(line)
file1.close
my_file = sys.argv[1]
read_data(my_file)
TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper