title: when i try to create a text file the following error is thrown
body: <p>This is the error i get when i run my code</p>
  <pre><code>File &quot;D:\talha\Documents\School\Computer\Programming\Caravan Park TKINTER\Tkinter Caravan.py&quot;, line 27, in Add_Customer
      with open(userFile, 'w')as details:
  PermissionError: [Errno 13] Permission denied: 'adfaadfadf.txt'
  </code></pre>
  <p>This is the code that causes the error</p>
  <pre><code>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()
  </code></pre>
  <p>this is the line in which the error occurs</p>
  <pre><code>with open(userFile, 'w')as details:
  </code></pre>