Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('file2.json', 'r', encoding="utf8") as file_data:
- datas = json.load(file_data)
- PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'file2.json'
- filename = 'file2.json'
- if os.path.exists(filename):
- os.remove(filename)
- os.chmod(filename, 0o777)
- fn = open(filename, 'r')
- fn.close()
Add Comment
Please, Sign In to add comment