Its the “no such file” side of the “No such file or directory” error. You need to include “w” write mode to create the file.
filePassword = open(r"C:\Users\NemPl\Desktop\ProLan\Python\Python programi\user." + profileName + "\pass." + profilePassword, "w")
solved How to make a folder instantly (as os.makedirs() creates a folder after the program has finished)?