Problem with Flash and Debug in VS code

Has anyone experienced the following error when Flashing (and debugging) from within VS Code. I have no idea what has happened, but it has hit several projects.

Even though it claims that flash has been programmed in last line, this is not true. Using Debug with Ozone will program the flash correctly.

-- west flash: using runner nrfutil
-- runners.nrfutil: reset after flashing requested
-- runners.nrfutil: Flashing file: D:\Workspaces\azure_iot_hub_8\build\merged.hex
Traceback (most recent call last):
File "C:\Users\ThomasMaltesen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts\nrfutil-script.py", line 6, in <module>
from pkg_resources import load_entry_point
File "D:\ncs\toolchains\0b393f9e1b\opt\bin\Lib\site-packages\pkg_resources\__init__.py", line 74
sys.path.extend(((vendor_path := os.path.join(os.path.dirname(os.path.dirname(__file__)), 'setuptools', '_vendor')) not in sys.path) * [vendor_path]) # fmt: skip
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "C:\Users\ThomasMaltesen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts\nrfutil-script.py", line 6, in <module>
from pkg_resources import load_entry_point
File "D:\ncs\toolchains\0b393f9e1b\opt\bin\Lib\site-packages\pkg_resources\__init__.py", line 74
sys.path.extend(((vendor_path := os.path.join(os.path.dirname(os.path.dirname(__file__)), 'setuptools', '_vendor')) not in sys.path) * [vendor_path]) # fmt: skip
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "C:\Users\ThomasMaltesen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts\nrfutil-script.py", line 6, in <module>
from pkg_resources import load_entry_point
File "D:\ncs\toolchains\0b393f9e1b\opt\bin\Lib\site-packages\pkg_resources\__init__.py", line 74
sys.path.extend(((vendor_path := os.path.join(os.path.dirname(os.path.dirname(__file__)), 'setuptools', '_vendor')) not in sys.path) * [vendor_path]) # fmt: skip
^
SyntaxError: invalid syntax
-- runners.nrfutil: Board with serial number 852006397 flashed successfully.

Related