JacquesLucke / blender_vscode

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

Incorrect path for bundled python #93

Open jed-blip opened 3 years ago

jed-blip commented 3 years ago

System: Windows 10 Blender: 2.90

When attempting to run blender via the plugin, this error occurs (I have replaced personal information with ****):

found bundled python: c:\Program Files\Blender Foundation\Blender 2.9\2.9\python
[{'load_dir': 'c:\\*********', 'module_name': '********'}]
found bundled python: c:\Program Files\Blender Foundation\Blender 2.9\2.9\python
unknown argument, loading as file: -m
Error: Cannot read file 'c:\Program Files\Blender Foundation\Blender 2.9\-m': No such file or directory
Error: argument has no '.blend' file extension, not using as new file, exiting! c:\Program Files\Blender Foundation\Blender 2.9\-m
Saved session recovery to 'C:\Users\****\AppData\Local\Temp\quit.blend'

Blender quit

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

I tracked it down to the install_package function in installation.py. The variable python_path was pointing to the folder for the bundled python and not the executable so the subproccess crashes.

JacquesLucke commented 3 years ago

Can you check if undoing https://github.com/JacquesLucke/blender_vscode/commit/3870175ef0a12394bb8f955cae3131d897ddfc13 fixes the issue for you?

jed-blip commented 3 years ago

Yes, that does resolve the issue

jed-blip commented 3 years ago

@JacquesLucke Any update on this issue?

ppinter1 commented 3 years ago

So, I tried a git revert on the above commit, but then stalled out thinking I'd need to build a new blender_vscode.vsix package for manual install into vscode? I'm on macOS and don't have Azure credentials. Would that npm 'yo' tool work?

I started seeing this when I standardized on Blender 2.83.13 and re-installed blender_vscode.

Is there anything I can do to get back to debugging my plug-in again?

Many thanks for an otherwise awesome extension!

jed-blip commented 3 years ago

The above commit is very small so I would recommend installing the latest version of blender_vscode via the visual studio extension marketplace and then manually edit the source code of the extension to "revert" the commit.

ppinter1 commented 3 years ago

Ah, right. I was over-thinking it. Sorry for hijacking this thread. Thank you!

kofi-de-com commented 3 years ago

I ran into the same issue with Blender 2.83. Left a comment on the commit for a suggested fix. https://github.com/JacquesLucke/blender_vscode/commit/3870175ef0a12394bb8f955cae3131d897ddfc13#commitcomment-49792834