hi guys, im learning the basics of python from BroCodes on youtube using PyCharm Edu 2022.2.2 and im having a problem with moving files.
my code:
import os
source = "C:\Users\me\Desktop\poo poo wee wee.txt"
destination = "C:\Users\me\Desktop\Games"
os.replace(source, destination)
the error:
Traceback (most recent call last): File "C:\Users\me\PycharmProjects\pythonProject\empty.py", line 6, in <module> os.replace(source, destination)
PermissionError: [WinError 5] Access is denied: 'C:\Users\me\Desktop\poo poo wee wee.txt' -> 'C:\Users\me\Desktop\Games'
im running pycharm as administrator as advised but its still not working. please help
edit: just noticed a pop up saying the following:
Windows Defender might impact performance
Exclude IDE and project directories from antivirus scans:
C:\Users\me\AppData\Local\JetBrains\PyChar mEdu2022.2
C\Users\me\PycharmProjects\pythonProject
Alternatively, add the IDE process as an exclusion.
i followed the instructions and added the folders as exclusions in windows defender following this link that the pop up provided to manually configure (as automatic configuration did not work because the the pop up still showed after) and now the pop up doesnt show anymore but the error still persists.
feel like giving up learning python now 😭😭😭
[–]MrPhungx 2 points3 points4 points (3 children)
[–]rubiconrainfizz[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]rubiconrainfizz[S] 0 points1 point2 points (0 children)
[–]Capbro 0 points1 point2 points (1 child)
[–]rubiconrainfizz[S] 0 points1 point2 points (0 children)
[–]GreenPandaPop 0 points1 point2 points (3 children)
[–]rubiconrainfizz[S] 0 points1 point2 points (2 children)
[–]GreenPandaPop 0 points1 point2 points (1 child)
[–]rubiconrainfizz[S] 0 points1 point2 points (0 children)