python error in kconfig extension?

When loading the nRF Connect Plugin for VCS, I am receiving either a crash message or the message below. It looks like a Python syntax error in the kconfig extension. python should be pointing to python2 in the 1.7.0 SDK directory.

This is the output window

[Info - 3:08:26 PM] Connection to server got closed. Server will restart.
File "/Users/allencurtis/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2021.11.7/srv/kconfiglsp.py", line 65
self.diags: Dict[str, List[Diagnostic]] = {}
^
SyntaxError: invalid syntax
File "/Users/allencurtis/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2021.11.7/srv/kconfiglsp.py", line 65
self.diags: Dict[str, List[Diagnostic]] = {}
^
SyntaxError: invalid syntax
[Info - 3:08:26 PM] Connection to server got closed. Server will restart.
File "/Users/allencurtis/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2021.11.7/srv/kconfiglsp.py", line 65
self.diags: Dict[str, List[Diagnostic]] = {}
^
SyntaxError: invalid syntax
[Info - 3:08:26 PM] Connection to server got closed. Server will restart.
File "/Users/allencurtis/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2021.11.7/srv/kconfiglsp.py", line 65
self.diags: Dict[str, List[Diagnostic]] = {}
^
SyntaxError: invalid syntax
[Info - 3:08:26 PM] Connection to server got closed. Server will restart.
File "/Users/allencurtis/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2021.11.7/srv/kconfiglsp.py", line 65
self.diags: Dict[str, List[Diagnostic]] = {}
^
SyntaxError: invalid syntax
[Error - 3:08:26 PM] Connection to server got closed. Server will not be restarted.
Parents Reply Children
  • Hi peter_h,

    Thanks for your suggestion.  It sounds simple enough.  But I'm unable to find anything when I perform the "Python: Default Interpreter Path" search.  I've included a three screenshots showing you how I got to the window and performed the search. The first image shows where I found the Settings choice. The second shows the Settings window before I entered anything into the search bar.  The third shows that nothing is found when search for "Python: Default Interpreter Path". 

    The website https://code.visualstudio.com/docs/python/environments#_manually-specify-an-interpreter makes it sound like I need to install the "Python Extension Pack".  But as far as I know, installing the "Python Extension Pack" wasn't part of the Nordic VSC setup process.

    Regards,

    Peter

  • Hi Peter M,

    Right you are - the 'Default Interpreter Path' setting appears to be from the 'Python' extension (I don't have the 'Python Extension Pack' installed). It's a little confusing that the setting would be respected by KConfig, but it appears to work in my case.

    The Python extension is provided by Microsoft, presumably it's safe to install (while the extension pack is from a 3rd party, so who knows).

Related