blender_vscode icon indicating copy to clipboard operation
blender_vscode copied to clipboard

Blender Developement v0.0.16 appears to be incompatible with Blender 3.1.2

Open SBCV opened this issue 2 years ago • 3 comments

Using Blender Developement v0.0.16 with Blender 3.0 works without any problems.

However, if I use Blender 3.1.2 instead, I receive the following error message:

  File "/home/user/.vscode/extensions/jacqueslucke.blender-development-0.0.16/pythonFiles/include/blender_vscode/external/get-pip.py", line 20890, in <module>
    main()
  File "/home/user/.vscode/extensions/jacqueslucke.blender-development-0.0.16/pythonFiles/include/blender_vscode/external/get-pip.py", line 197, in main
    bootstrap(tmpdir=tmpdir)
  File "/home/user/.vscode/extensions/jacqueslucke.blender-development-0.0.16/pythonFiles/include/blender_vscode/external/get-pip.py", line 82, in bootstrap
    import pip._internal
  File "/tmp/tmpo29qbuos/pip.zip/pip/_internal/__init__.py", line 40, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_internal/cli/autocompletion.py", line 8, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_internal/cli/main_parser.py", line 12, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_internal/commands/__init__.py", line 6, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_internal/commands/completion.py", line 6, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_internal/cli/base_command.py", line 23, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_internal/index.py", line 14, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_vendor/html5lib/__init__.py", line 25, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_vendor/html5lib/html5parser.py", line 8, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_vendor/html5lib/_tokenizer.py", line 16, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_vendor/html5lib/_trie/__init__.py", line 3, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_vendor/html5lib/_trie/py.py", line 6, in <module>
  File "/tmp/tmpo29qbuos/pip.zip/pip/_vendor/html5lib/_trie/_base.py", line 3, in <module>
ImportError: cannot import name 'Mapping' from 'collections' (/libraries/blender/blender-3.1.2-linux-x64/3.1/python/lib/python3.10/collections/__init__.py)
/libraries/blender/blender-3.1.2-linux-x64/3.1/python/bin/python3.10: No module named pip

################################################################################
>   could not install debugpy
################################################################################

I've seen that (recently) there have been added some commits (bacc158dae612c41780f5c68ec6b4951bf9f9e76, 046c8724bf02dca0a33fc8f0ae8ba8e92c3961ac) potentially related to this issue. Thus, I wanted to run the latest Blender Developement version from Github.

Since this version is not available in the VS-Code-Marketplace, I tried to build it from source following this guide:

git clone https://github.com/JacquesLucke/blender_vscode
cd blender_vscode/
sudo npm install -g vsce
sudo npm install -g typescript
vsce package

However, running vsce package throws a lot of error messages:

(base) user@my_pc:/BlenderAddons/blender_vscode$ vsce package
Executing prepublish script 'npm run vscode:prepublish'...

> [email protected] vscode:prepublish
> npm run compile

> [email protected] compile
> tsc -p ./

src/addon_folder.ts:1:23 - error TS2307: Cannot find module 'path' or its corresponding type declarations.
1 import * as path from 'path';
                        ~~~~~~

src/addon_folder.ts:2:25 - error TS2307: Cannot find module 'vscode' or its corresponding type declarations.
2 import * as vscode from 'vscode';
                          ~~~~~~~~

src/blender_executable.ts:1:21 - error TS2307: Cannot find module 'os' or its corresponding type declarations.
1 import * as os from 'os';
                      ~~~~
...

Found 55 errors in 13 files.

Errors  Files
     2  src/addon_folder.ts:1
     7  src/blender_executable.ts:1
     2  src/blender_folder.ts:1
     6  src/communication.ts:1
     1  src/data_loader.ts:1
     1  src/extension.ts:3
     7  src/new_addon.ts:1
     2  src/new_operator.ts:1
     2  src/paths.ts:1
     3  src/python_debugging.ts:1
     2  src/scripts.ts:1
     1  src/select_utils.ts:1
    19  src/utils.ts:1
 ERROR  npm failed with exit code 2

Does anybody know, if the new commits will be pushed to the market place? If not, it would be very helpful to have some guideline, how to build the Blender Development extension. Has anyone some experience with that?

SBCV avatar Apr 15 '22 18:04 SBCV

npm i @types/node -D fixed the errors and I could successfully run Blender Development with Blender 3.1.2

SBCV avatar Apr 15 '22 18:04 SBCV

npm i @types/node -D fixed the errors and I could successfully run Blender Development with Blender 3.1.2

thanks, your solution helped me

chepecarlos avatar May 19 '22 23:05 chepecarlos

Between @SBCV 's comments above and this issue, it doesn't seem like this is still a problem. I recommend closing the issue.

M-Scott-Lassiter avatar Oct 19 '22 19:10 M-Scott-Lassiter