I am trying to run a script in python and I got this error:
PermissionError: [Errno 13] Permission denied: 'E:\\Projects\\Abusive Comments Filter\\zest.txt'
main.py
import re
import tkinter as tk
import subprocess
import urllib.request
from inscriptis import get_text
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
path1 = os.path.join(BASE_DIR,'Abusive-Comments-Filter-master/zest.txt')
# url = input("Enter URL\n")
url = "https://www.quora.com/What-are-all-the-bad-words-and-their-meanings"
html = urllib.request.urlopen(url).read().decode('utf-8')
text = get_text(html)
path = r'path1'
# path = ''
file = open(path, 'w')
file.write(text)
file.close()
How can i fix this please.