kjcar
Hello, 
 
I just installed OpenPLC runtime and Editor, and when trying to compile the Blank Project Folder for arduino, I get this error message. I'm unsure of how to fix this, if anyone can help. Thank you!

e-type:
<class 'PermissionError'>
e-value:
[WinError 5] Access is denied: 'C:\\Users\\kjcar\\OneDrive\\Desktop\\Blank Project\\build\\extra_files'
locals:
path: 'C:\\Users\\kjcar\\OneDrive\\Desktop\\Blank Project\\build\\extra_files'
onerror: <function rmtree.<locals>.onerror at 0x000001E8EB54ED30>
scandir_it: <nt.ScandirIterator object at 0x000001E8E6EB66D0>
entries: []
platform:
Windows-10-10.0.22631-SP0
python-version:
3.9.10
traceback:
File "C:\Users\kjcar\OpenPLC_Editor\.\editor\BeremizIDE.py", line 829, in OnMenu
getattr(self.CTR, method)()
File "C:\Users\kjcar\OpenPLC_Editor\.\editor\ProjectController.py", line 2206, in _generateArduino
self._Clean()
File "C:\Users\kjcar\OpenPLC_Editor\.\editor\ProjectController.py", line 1562, in _Clean
shutil.rmtree(os.path.join(self._getBuildPath()))
File "C:\Users\kjcar\OpenPLC_Editor\python\lib\shutil.py", line 749, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\kjcar\OpenPLC_Editor\python\lib\shutil.py", line 622, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\kjcar\OpenPLC_Editor\python\lib\shutil.py", line 631, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "C:\Users\kjcar\OpenPLC_Editor\python\lib\shutil.py", line 629, in _rmtree_unsafe
os.rmdir(path)
<class 'PermissionError'>: [WinError 5] Access is denied: 'C:\\Users\\kjcar\\OneDrive\\Desktop\\Blank Project\\build\\extra_files'
wx-platform:
__WXMSW__
wx-version:
4.2.0
 
Reply 0 0
thiagoralves
It seems that you don’t have write permission for the folder where the project is located. The editor must be able to write to that folder to generate the build files
Reply 0 0
kjcar
Hello! Thank you for the response. 
 
I apologize, I didn't explain my situation in it's entirety. That was why I was so confused, because I am the administrator on this device. I'm the only user and it's my personal device, so no education or business blocks. 
 
I've tried uninstalling and reinstalling, safe mode, disabling antivirus/protection, to the same result. 
 
Additionally, I attempted to run Editor as administrator, but I kept receiving an error that it was not able to locate pythonw.exe, which also made no sense, because I can see that the file exists in the directory. 
 
I was able to get the board selection dialog to come up once, but when I went to confirm, the error I first posted popped up again, but this has not happened again since that one time. 
Reply 0 0
thiagoralves
Take your project out of the “OneDrive” folder
Reply 0 0
kjcar
Hello again! For some reason I thought everything was local. I went through and just removed and uninstalled again, stopped onedrive backup, and I am still getting the same bug report that references the OneDrive location, but I don't understand why or how, as everything is showing a different file path in their properties. I feel like I'm missing something, and I apologize if it's an easy fix, but I genuinely cannot figure it out. 

Screenshot 2024-04-22 173936.png Screenshot 2024-04-22 174015.png Screenshot 2024-04-22 174109.png
Reply 0 0
kjcar
Oh man. I FINALLY figured it out. I had to completely uninstall onedrive from my computer. Even if you have all of the settings off, moved all the files, have local addresses, everything still routes through Onedrive if it's installed. What a headache. 

Thank you again for your help! I appreciate your time. Thank you so much. 
Reply 0 0
thiagoralves
OneDrive can be really nasty sometimes. I honestly hate that Microsoft pushes this piece of trash on every Windows installation. I’m glad you were able to fix it
Reply 0 0
Write a reply...
Reply