Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue starting Blender from VsCode on Mac #125

Open
Lehong-Wang opened this issue May 24, 2022 · 2 comments
Open

Issue starting Blender from VsCode on Mac #125

Lehong-Wang opened this issue May 24, 2022 · 2 comments

Comments

@Lehong-Wang
Copy link

I tried to start blender form the plugin, but it gave me an error, here is output from terminal:


> Executing task: /Applications/Blender.app/Contents/MacOS/blender --python /Users/lhwang/.vscode/extensions/jacqueslucke.blender-development-0.0.16/pythonFiles/launch.py <

Read prefs: /Users/lhwang/Library/Application Support/Blender/2.90/config/userpref.blend
found bundled python: /Applications/Blender.app/Contents/Resources/2.90/python
[]
 * Serving Flask app 'Blender Server' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:2751 (Press CTRL+C to quit)
Read prefs: /Users/lhwang/Library/Application Support/Blender/2.90/config/userpref.blend
found bundled python: /Applications/Blender.app/Contents/Resources/2.90/python
Error: File format is not supported in file '/Applications/Blender.app/Contents/Resources/2.90/python/lib/python3.7/site-packages/debugpy/adapter'
Error: argument has no '.blend' file extension, not using as new file, exiting! /Applications/Blender.app/Contents/Resources/2.90/python/lib/python3.7/site-packages/debugpy/adapter
Saved session recovery to '/var/folders/d9/w87xyhb12vgg2x5qygx_nvr80000gn/T/quit.blend'

Blender quit
Traceback (most recent call last):
  File "/Applications/Blender.app/Contents/Resources/2.90/python/lib/python3.7/site-packages/debugpy/server/api.py", line 218, in listen
    sock, _ = endpoints_listener.accept()
  File "/Applications/Blender.app/Contents/Resources/2.90/python/lib/python3.7/socket.py", line 212, in accept
    fd, addr = self._accept()
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/lhwang/.vscode/extensions/jacqueslucke.blender-development-0.0.16/pythonFiles/launch.py", line 18, in <module>
    allow_modify_external_python=os.environ['ALLOW_MODIFY_EXTERNAL_PYTHON'] == "yes",
  File "/Users/lhwang/.vscode/extensions/jacqueslucke.blender-development-0.0.16/pythonFiles/include/blender_vscode/__init__.py", line 17, in startup
    communication.setup(editor_address, path_mappings)
  File "/Users/lhwang/.vscode/extensions/jacqueslucke.blender-development-0.0.16/pythonFiles/include/blender_vscode/communication.py", line 21, in setup
    DEBUGPY_PORT = start_debug_server()
  File "/Users/lhwang/.vscode/extensions/jacqueslucke.blender-development-0.0.16/pythonFiles/include/blender_vscode/communication.py", line 53, in start_debug_server
    debugpy.listen(("localhost", port))
  File "/Applications/Blender.app/Contents/Resources/2.90/python/lib/python3.7/site-packages/debugpy/__init__.py", line 113, in listen
    return api.listen(address)
  File "/Applications/Blender.app/Contents/Resources/2.90/python/lib/python3.7/site-packages/debugpy/server/api.py", line 143, in debug
    log.reraise_exception("{0}() failed:", func.__name__, level="info")
  File "/Applications/Blender.app/Contents/Resources/2.90/python/lib/python3.7/site-packages/debugpy/server/api.py", line 141, in debug
    return func(address, settrace_kwargs, **kwargs)
  File "/Applications/Blender.app/Contents/Resources/2.90/python/lib/python3.7/site-packages/debugpy/server/api.py", line 232, in listen
    raise RuntimeError("timed out waiting for adapter to connect")
RuntimeError: timed out waiting for adapter to connect
Saved session recovery to '/var/folders/d9/w87xyhb12vgg2x5qygx_nvr80000gn/T/quit.blend'

Terminal will be reused by tasks, press any key to close it.

Before this error, I manually installed debugpy and flask in blender.

There are some of my system info:
OS: Mac Big Sur

Extension Version: 0.0.16

Blender Version: 2.90.0

VS Code Version: 1.67.2

Blender Python Version: 3.7

System Python Version: 3.7.10

I'm not sure how to deal with this. Can someone please help me with this?

Thanks

@jdknox
Copy link

jdknox commented Jun 13, 2022

I'm not sure about this, but I suspect you may not have any addons in the addon folder. Try making one first and see if the error persists.

Execute the Blender: New Addon operator and use the setup wizard. You will be asked for the following information:

  • Which addon template should be used?
  • Where should the addon be created? This should be an empty folder, preferably without spaces or special characters in the name.
  • What is the name of the addon?
  • What is your name?

@yanxiang-wang
Copy link

I have the same problem, and do you solve it?

Executing task: /Applications/Blender.app/Contents/MacOS/Blender --python /Users/x/.vscode/extensions/jacqueslucke.blender-development-0.0.17/pythonFiles/launch.py 
Read prefs: /Users/x/Library/Application Support/Blender/2.83/config/userpref.blend
found bundled python: /Applications/Blender.app/Contents/Resources/2.83/python
source /Users/x/anaconda3/bin/activate py37
[{'load_dir': '/Users/x/Desktop/blender_plugin', 'module_name': 'blender_plugin'}]
 * Serving Flask app 'Blender Server'
 * Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:4341
Press CTRL+C to quit
Read prefs: /Users/x/Library/Application Support/Blender/2.83/config/userpref.blend
found bundled python: /Applications/Blender.app/Contents/Resources/2.83/python
No module named 'netgen.meshing'
No module named 'netgen.meshing'
Warning: class No_En_Con contains a property which should be an annotation!

Error: File format is not supported in file '/Applications/Blender.app/Contents/Resources/2.83/python/lib/python3.7/site-packages/debugpy/adapter'
Error: argument has no '.blend' file extension, not using as new file, exiting! /Applications/Blender.app/Contents/Resources/2.83/python/lib/python3.7/site-packages/debugpy/adapter
Saved session recovery to '/var/folders/yn/fz_sfff92jng823q7vknyfkm0000gn/T/quit.blend'

Blender quit
Traceback (most recent call last):
  File "/Applications/Blender.app/Contents/Resources/2.83/python/lib/python3.7/site-packages/debugpy/server/api.py", line 215, in listen
    sock, _ = endpoints_listener.accept()
  File "/Applications/Blender.app/Contents/Resources/2.83/python/lib/python3.7/socket.py", line 212, in accept
    fd, addr = self._accept()
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/xiangchen2011/.vscode/extensions/jacqueslucke.blender-development-0.0.17/pythonFiles/launch.py", line 18, in <module>
    allow_modify_external_python=os.environ['ALLOW_MODIFY_EXTERNAL_PYTHON'] == "yes",
  File "/Users/x/.vscode/extensions/jacqueslucke.blender-development-0.0.17/pythonFiles/include/blender_vscode/__init__.py", line 17, in startup
    communication.setup(editor_address, path_mappings)
  File "/Users/x/.vscode/extensions/jacqueslucke.blender-development-0.0.17/pythonFiles/include/blender_vscode/communication.py", line 21, in setup
    DEBUGPY_PORT = start_debug_server()
  File "/Users/x/.vscode/extensions/jacqueslucke.blender-development-0.0.17/pythonFiles/include/blender_vscode/communication.py", line 53, in start_debug_server
    debugpy.listen(("localhost", port))
  File "/Applications/Blender.app/Contents/Resources/2.83/python/lib/python3.7/site-packages/debugpy/public_api.py", line 31, in wrapper
    return wrapped(*args, **kwargs)
  File "/Applications/Blender.app/Contents/Resources/2.83/python/lib/python3.7/site-packages/debugpy/server/api.py", line 140, in debug
    log.reraise_exception("{0}() failed:", func.__name__, level="info")
  File "/Applications/Blender.app/Contents/Resources/2.83/python/lib/python3.7/site-packages/debugpy/server/api.py", line 138, in debug
    return func(address, settrace_kwargs, **kwargs)
  File "/Applications/Blender.app/Contents/Resources/2.83/python/lib/python3.7/site-packages/debugpy/server/api.py", line 229, in listen
    raise RuntimeError("timed out waiting for adapter to connect")
RuntimeError: timed out waiting for adapter to connect
Saved session recovery to '/var/folders/yn/fz_sfff92jng823q7vknyfkm0000gn/T/quit.blend'
 *  Terminal will be reused by tasks, press any key to close it. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants