circuitdojo / nrf9160-feather-examples-and-drivers

Zephyr examples and drivers for the nRF9160 Feather
Apache License 2.0
43 stars 19 forks source link

PermissionError / WinError 5 when trying to init repo #7

Closed muffeeee closed 2 years ago

muffeeee commented 2 years ago

Hi, Following the tutorial on the circuitdojo website for getting started with the nrf9160, I ran into a problem that, despite hours of trying, I cannot find a way to solve. I have no idea where else to get help; I am sorry if this is not the right place.

I am trying to perform Init Repo via the Zephyr extension in VSCode. What I'm observing is a PermissionError (WinError 5) where the init script can't copy/move a file into the nfed folder. Also, when trying to delete the nfed folder, this is not possible as I need permission to delete this, even though I am on a Windows account with administrator privileges.

Logs:

Cloning into 'C:\Users\LXD-AV-03\Desktop\sisteforsok\.west\manifest-tmp'...
remote: Enumerating objects: 899, done.
remote: Counting objects: 100% (899/899), done.
remote: Compressing objects: 100% (521/521), done.
remote: Total 899 (delta 472), reused 750 (delta 327), pack-reused 0
Receiving objects: 100% (899/899), 6.71 MiB | 9.23 MiB/s, done.
Resolving deltas: 100% (472/472), done.
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 815, in move
    os.rename(src, real_dst)
PermissionError: [WinError 5] Ingen tilgang: 'C:\\Users\\LXD-AV-03\\Desktop\\sisteforsok\\.west\\manifest-tmp' -> 'C:\\Users\\LXD-AV-03\\Desktop\\sisteforsok\\nfed'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\LXD-AV-03\.zephyrtools\env\Scripts\west.exe\__main__.py", line 7, in <module>   
  File "C:\Users\LXD-AV-03\.zephyrtools\env\lib\site-packages\west\app\main.py", line 781, in main
    app.run(argv or sys.argv[1:])
  File "C:\Users\LXD-AV-03\.zephyrtools\env\lib\site-packages\west\app\main.py", line 106, in run    self.run_command(argv)
  File "C:\Users\LXD-AV-03\.zephyrtools\env\lib\site-packages\west\app\main.py", line 336, in run_command
    cmd.run(args, unknown, self.topdir, manifest=self.manifest)
  File "C:\Users\LXD-AV-03\.zephyrtools\env\lib\site-packages\west\commands.py", line 140, in run    self.do_run(args, unknown)
  File "C:\Users\LXD-AV-03\.zephyrtools\env\lib\site-packages\west\app\project.py", line 198, in 
do_run
    topdir = self.bootstrap(args)
  File "C:\Users\LXD-AV-03\.zephyrtools\env\lib\site-packages\west\app\project.py", line 305, in 
bootstrap
    shutil.move(os.fspath(tempdir), os.fspath(manifest_abspath))
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 833, in move
    rmtree(src)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 749, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 622, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 622, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 622, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 627, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 625, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Ingen tilgang: 'C:\\Users\\LXD-AV-03\\Desktop\\sisteforsok\\.west\\manifest-tmp\\.git\\objects\\pack\\pack-ae179110ddff9c4a119793934f0f44c69e9e0976.idx'
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command west init -m https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers.git" terminated with exit code: 1.

I've tried the following:

Any help would be appreciated.

jaredwolff commented 2 years ago

@muffeeee sorry I missed this somehow. Please tag me in the future or open a new post on the support forum https://community.jaredwolff.com

There are a few things here. I've seen that powershell has caused issues with the VSCode extension in the past. Also, in very early versions of the extension, the Git plugin in VSCode would interfere with the download process. Those have been fixed since.

Again sorry for the delay. I don't monitor this part of the repository.