More about this problem: ======================================= File "C:\Users\rdboylan\Documents\src\CraftRoot\\download\CraftBootstrap.py", line 276, in <module> setUp(args) File "C:\Users\rdboylan\Documents\src\CraftRoot\\download\CraftBootstrap.py", line 245, in setUp shutil.rmtree(os.path.join(args.prefix, f"craft-{args.branch}")) # deleted some stack trace PermissionError: [WinError 5] Access is denied: 'C:\\Users\\rdboylan\\Documents\\src\\CraftRoot\\craft-master\\.git\\objects\\pack\\pack-4969c0e6eb29b4eb9bdb70e0a0397e1a1b7ffe48.idx' ------------------------------------------------ Could this be the result of Windows Explorer or its git gui somehow locking the file? It seems a little odd the problem arose after many other packages succeeded. I was not running with admin rights. ===================================
Line 245 is near the end of the installation; it's trying to delete a directory with the original craft code: shutil.rmtree(os.path.join(args.prefix, f"craft-{args.branch}")). The standard procedure creates that directory by pulling an archive file from github and expanding it; I created it by copying from a local git repository of craft (the copy used python's shutil not git clone--code below). I notice that CraftRoot\craft-master\.git is missing many files, but that is probably because its partly deleted. The file mentioned in the error message is readable and bit-identical to the original. I don't know if any of this matters, since I can't see how it would make a difference. Having the directory open in explorer, which I did, still seems a more likely cause of the problem. Ross My version of CraftSetup.py has if args.localDev: shutil.copytree(args.localDev, os.path.join(args.prefix, f"craft-{args.branch}")) print("Getting code from local {}".format(args.localDev)) else: CraftBootstrap.downloadFile(f"https://github.com/KDE/craft/archive/{args.branch}.zip", os.path.join(args.prefix, "download"), f"craft-{args.branch}.zip") shutil.unpack_archive(os.path.join(args.prefix, "download", f"craft-{args.branch}.zip"), args.prefix) and took the first branch of the if.