JacquesLucke / blender_vscode

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

RuntimeError: timed out waiting for adapter to connect #103

Open derekeden opened 3 years ago

derekeden commented 3 years ago

Hi there,

Trying to get your extension to work, and can't seem to get Blender to start from VSCode.

I was able to install the extension fine, create a new add-on, and make it through the debugpy, flask and other import errors.

Now, when I try to use Blender > Start, I guess this error msg:

`> Executing task in folder Baird_Blender: c:\Program Files\Blender Foundation\Blender 2.82\blender.exe --python c:\Users\deden\.vscode\extensions\jacqueslucke.blender-development-0.0.15\pythonFiles\launch.py <

Read prefs: C:\Users\deden\AppData\Roaming\Blender Foundation\Blender\2.82\config\userpref.blend
found bundled python: c:\Program Files\Blender Foundation\Blender 2.82\2.82\python
Exception ignored in: <function ImagePreviewCollection.__del__ at 0x000002553C6318B8>
Traceback (most recent call last):
  File "c:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\modules\bpy\utils\previews.py", line 79, in __del__
    f"{self!r}: left open, remove with "
ResourceWarning: <ImagePreviewCollection id=0x2553c661948[1], <super: <class 'ImagePreviewCollection'>, <ImagePreviewCollection object>>>: left open, remove with 'bpy.utils.previews.remove()'
register_class(...):
Warning: 'CR_List_Selector' doesn't contain '_UL_' with prefix & suffix
register_class(...):
Warning: 'CR_List_Command' doesn't contain '_UL_' with prefix & suffix
register_class(...):
Warning: 'CR_List_Instance' doesn't contain '_UL_' with prefix & suffix
register_class(...):
Warning: 'CR_List_PT_VIEW_3D' doesn't have upper case alpha-numeric prefix
register_class(...):
Warning: 'CR_List_PT_IMAGE_EDITOR' doesn't have upper case alpha-numeric prefix
Register
Warning: property 'release_confirm' not found in keymap item 'OperatorProperties'
[{'load_dir': 'c:\\code\\Baird_Blender', 'module_name': 'Baird_Blender'}, {'load_dir': 'c:\\code\\Baird_Blender\\f', 'module_name': 'f'}, {'load_dir': 'c:\\code\\Baird_Blender\\t', 'module_name': 't'}]
 * 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
Traceback (most recent call last):
  File "c:\Program Files\Blender Foundation\Blender 2.82\2.82\python\lib\site-packages\debugpy\server\api.py", line 218, in listen
    sock, _ = endpoints_listener.accept()
  File "c:\Program Files\Blender Foundation\Blender 2.82\2.82\python\lib\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 "c:\Users\deden\.vscode\extensions\jacqueslucke.blender-development-0.0.15\pythonFiles\launch.py", line 18, in
<module>
    allow_modify_external_python=os.environ['ALLOW_MODIFY_EXTERNAL_PYTHON'] == "yes",
  File "c:\Users\deden\.vscode\extensions\jacqueslucke.blender-development-0.0.15\pythonFiles\include\blender_vscode\__init__.py", line 17, in startup
    communication.setup(editor_address, path_mappings)
  File "c:\Users\deden\.vscode\extensions\jacqueslucke.blender-development-0.0.15\pythonFiles\include\blender_vscode\communication.py", line 21, in setup
    DEBUGPY_PORT = start_debug_server()
  File "c:\Users\deden\.vscode\extensions\jacqueslucke.blender-development-0.0.15\pythonFiles\include\blender_vscode\communication.py", line 53, in start_debug_server
    debugpy.listen(("localhost", port))
  File "c:\Program Files\Blender Foundation\Blender 2.82\2.82\python\lib\site-packages\debugpy\__init__.py", line 113, in listen
    return api.listen(address)
  File "c:\Program Files\Blender Foundation\Blender 2.82\2.82\python\lib\site-packages\debugpy\server\api.py", line 143, in debug
    log.reraise_exception("{0}() failed:", func.__name__, level="info")
  File "c:\Program Files\Blender Foundation\Blender 2.82\2.82\python\lib\site-packages\debugpy\server\api.py", line 141, in debug
    return func(address, settrace_kwargs, **kwargs)
  File "c:\Program Files\Blender Foundation\Blender 2.82\2.82\python\lib\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 'C:\Users\deden\AppData\Local\Temp\quit.blend'

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

I'm using Blender 2.82 and VSCode 1.57.0... I'm honestly not sure what all these errors/warnings mean..can you help?

I made sure to set the proper interpreter in VSCode as well.

ln-12 commented 3 years ago

I am getting the same error. I figured out that v0.0.14 works fine, but from v0.0.15 it breaks, so it is probably related to #95

Running on Windows 10 and Blender 2.83 LTS btw.

ln-12 commented 3 years ago

Yep, #95 states that the fix is for Blender > 2.92, so I installed 2.93 LTS and it works now. So either user the plugin v0.0.14 or upgrade Blender.