I am trying to pass in a file in-memory . So I am referencing this post here to create in-memory file object: How to create in-memory file object
I created the code below, but now when I pass in my function.
fil_location = io.StringIO()
fil_location.write('test')
password = credential_function.from_keyfile_name(fil_location)
I get this error:
with open(filename, 'r') as file_obj:
TypeError: expected str, bytes or os.PathLike object, not _io.StringIO