这是我运行代码时遇到的错误
File "D:\talha\Documents\School\Computer\Programming\Caravan Park TKINTER\Tkinter Caravan.py", line 27, in Add_Customer
with open(userFile, 'w')as details:
PermissionError: [Errno 13] Permission denied: 'adfaadfadf.txt'
这是导致错误的代码
def Add_Customer():
nameEntry = firstName.get()
lastNameEntry = lastName.get()
EmailEntry = Email.get()
PhoneEntry = Phone.get()
userFile = nameEntry+lastNameEntry+'.txt'
with open(userFile, 'w')as details:
details.write('First Name: '+nameEntry)
details.write('Last Name: '+lastNameEntry)
details.write('Email Address: '+EmailEntry)
details.write('Phone Number: '+PhoneEntry)
details.close()
这是发生错误的行
with open(userFile, 'w')as details:
慕森卡
相关分类