import shutil def backup(): p = input('PATH1') p2 = input('PATH2') name = input('Name') cop = p2 + name + '.txt' file = open(cop,'r+') file2 = open(str(p),'r+') shutil.copy(p,cop) file.close() file2.close() backup() C:\Users\Сергей\Desktop\Новый текстовый документ.txt C:\Users\Сергей\Desktop\ sdf Traceback (most recent call last): File "<pyshell#28>", line 1, in <module> backup() File "<pyshell#27>", line 6, in backup file = open(cop,'r+') OSError: [Errno 22] Invalid argument: '\u202aC:\\Users\\Сергей\\Desktop\\sdf.txt'