JacquesLucke / blender_vscode

Visual Studio Code extension for Blender development.
MIT License
545 stars 74 forks source link

I can't Build and Start my project in Blender 2.83 #73

Closed neverhood311 closed 4 years ago

neverhood311 commented 4 years ago

First of all, thank you for this project!! For the first three years of developing my addon I thought that debugging and stepping into my code was simply impossible. blender_vscode has significantly reduced the pain of developing Blender addons and has made me much more productive.

That being said, I'm having trouble with Blender 2.83. When I run the Build and Start command, Blender tries to start, then fails. I'll post the error below. It worked fine with Blender 2.81 and 2.82.

Here's the error I'm getting:

Executing task: c:\Program Files\Blender Foundation\Blender 2.83\blender.exe --python c:\Users\[username]\.vscode\extensions\jacqueslucke.blender-development-0.0.12\pythonFiles\launch.py <

Read prefs: C:\Users\[username]\AppData\Roaming\Blender Foundation\Blender\2.83\config\userpref.blend
found bundled python: c:\Program Files\Blender Foundation\Blender 2.83\2.83\python

// these next two lines are related to my addon:
0  meshes freed
[{'load_dir': 'c:\\Users\\[username]\\Documents\\GitHub\\Stop-motion-OBJ', 'module_name': 'Stop-motion-OBJ'}]
Collecting ptvsd
  Using cached https://files.pythonhosted.org/packages/f8/0c/310467fae43421c44131f9a445c8fd925933d4710bf501c7fa42ff86b1af/ptvsd-4.3.2-cp37-cp37m-win_amd64.whl
Installing collected packages: ptvsd
Successfully installed ptvsd-4.3.2
Exception:
Traceback (most recent call last):
  File "c:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\shutil.py", line 566, in move
    os.rename(src, real_dst)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\[username]\\AppData\\Local\\Temp\\pip-target-7n3jyb_u\\lib\\python\\ptvsd' -> 'c:\\Program Files\\Blender Foundation\\Blender 2.83\\2.83\\python\\lib\\site-packages\\ptvsd'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pip\_internal\cli\base_command.py", line 179, in main
    status = self.run(options, args)
  File "c:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pip\_internal\commands\install.py", line 441, in run
    options.target_dir, target_temp_dir, options.upgrade
  File "c:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\pip\_internal\commands\install.py", line 498, in _handle_target_dir
    target_item_dir
  File "c:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\shutil.py", line 577, in move
    symlinks=True)
  File "c:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\shutil.py", line 324, in copytree
    os.makedirs(dst)
  File "c:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\os.py", line 221, in makedirs
    mkdir(name, mode)
PermissionError: [WinError 5] Access is denied: 'c:\\Program Files\\Blender Foundation\\Blender 2.83\\2.83\\python\\lib\\site-packages\\ptvsd'
You are using pip version 19.0.3, however version 20.2b1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

################################################################################
>   could not install ptvsd
################################################################################

Saved session recovery to 'C:\Users\[username]\AppData\Local\Temp\quit.blend'
The terminal process terminated with exit code: 1

Something about ptvsd and permissions. Any ideas?

neverhood311 commented 4 years ago

I just found this issue: https://github.com/JacquesLucke/blender_vscode/issues/31 with similar symptoms that was solved simply by opening VSCode in Admin mode then starting Blender one time via VSCode.

Now I can start VSCode normally and the issue is gone.