KW47 VSCode Integration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KW47 VSCode Integration

Jump to solution
255 Views
ciband
Contributor II

I am trying to get the KW47 bluetooth digital key anchor freeRTOS SDK sample imported and building.  When I attempt to import the example application I get this error:

Error: Failed to create freestanding example: Traceback (most recent call last):
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/commands.py", line 565, in __call__
    mod = _commands_module_from_file(self.py_file)
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/commands.py", line 718, in _commands_module_from_file
    spec.loader.exec_module(mod)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/grmn/prj/aoem/mcuxpresso-sdk/mcuxsdk/mcuxsdk/scripts/west_commands/export_app.py", line 12, in <module>
    from export_app.cmake_parser import cmparser
  File "/grmn/prj/aoem/mcuxpresso-sdk/mcuxsdk/mcuxsdk/scripts/west_commands/export_app/cmake_parser.py", line 11, in <module>
    from jinja2 import Template
ModuleNotFoundError: No module named 'jinja2'

 

The above exception was the direct cause of the following exception:

 

Traceback (most recent call last):
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/app/main.py", line 584, in run_command
    self.run_extension(args.command, argv)
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/app/main.py", line 708, in run_extension
    self.cmd = self.extensions[name].factory()
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/commands.py", line 567, in __call__
    raise ExtensionCommandError(
west.commands.ExtensionCommandError

 

During handling of the above exception, another exception occurred:

 

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/__main__.py", line 3, in <module>
    main()
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/app/main.py", line 1199, in main
    app.run(argv or sys.argv[1:])
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/app/main.py", line 278, in run
    self.run_command(argv, early_args)
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/app/main.py", line 628, in run_command
    self.handle_extension_command_error(ece)
  File "/home/johnsonchris/.local/lib/python3.10/site-packages/west/app/main.py", line 454, in handle_extension_command_error
    self.cmd.err(msg, fatal=True)
AttributeError: 'NoneType' object has no attribute 'err'


To my knowledge all of the dependencies are satisfied.  I attempted to install the SDK dependency manager application on Linux but this installation also fails.

0 Kudos
Reply
1 Solution
166 Views
ciband
Contributor II

Missing jinja2 package was the solution.  pip3 install jinja2

View solution in original post

0 Kudos
Reply
1 Reply
167 Views
ciband
Contributor II

Missing jinja2 package was the solution.  pip3 install jinja2

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2265168%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EKW47%20VSCode%20Integration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265168%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20trying%20to%20get%20the%20KW47%20bluetooth%20digital%20key%20anchor%20freeRTOS%20SDK%20sample%20imported%20and%20building.%26nbsp%3B%20When%20I%20attempt%20to%20import%20the%20example%20application%20I%20get%20this%20error%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EError%3A%20Failed%20to%20create%20freestanding%20example%3A%20Traceback%20(most%20recent%20call%20last)%3A%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2Fcommands.py%22%2C%20line%20565%2C%20in%20__call__%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20mod%20%3D%20_commands_module_from_file(self.py_file)%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2Fcommands.py%22%2C%20line%20718%2C%20in%20_commands_module_from_file%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20spec.loader.exec_module(mod)%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%3CFROZEN%20importlib._bootstrap_external%3D%22%22%3E%22%2C%20line%20883%2C%20in%20exec_module%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%3CFROZEN%20importlib._bootstrap%3D%22%22%3E%22%2C%20line%20241%2C%20in%20_call_with_frames_removed%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fgrmn%2Fprj%2Faoem%2Fmcuxpresso-sdk%2Fmcuxsdk%2Fmcuxsdk%2Fscripts%2Fwest_commands%2Fexport_app.py%22%2C%20line%2012%2C%20in%20%3CMODULE%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20from%20export_app.cmake_parser%20import%20cmparser%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fgrmn%2Fprj%2Faoem%2Fmcuxpresso-sdk%2Fmcuxsdk%2Fmcuxsdk%2Fscripts%2Fwest_commands%2Fexport_app%2Fcmake_parser.py%22%2C%20line%2011%2C%20in%20%3CMODULE%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20from%20jinja2%20import%20Template%3CBR%20%2F%3EModuleNotFoundError%3A%20No%20module%20named%20'jinja2'%3C%2FMODULE%3E%3C%2FMODULE%3E%3C%2FFROZEN%3E%3C%2FFROZEN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThe%20above%20exception%20was%20the%20direct%20cause%20of%20the%20following%20exception%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ETraceback%20(most%20recent%20call%20last)%3A%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2Fapp%2Fmain.py%22%2C%20line%20584%2C%20in%20run_command%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20self.run_extension(args.command%2C%20argv)%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2Fapp%2Fmain.py%22%2C%20line%20708%2C%20in%20run_extension%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20self.cmd%20%3D%20self.extensions%5Bname%5D.factory()%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2Fcommands.py%22%2C%20line%20567%2C%20in%20__call__%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20raise%20ExtensionCommandError(%3CBR%20%2F%3Ewest.commands.ExtensionCommandError%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EDuring%20handling%20of%20the%20above%20exception%2C%20another%20exception%20occurred%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ETraceback%20(most%20recent%20call%20last)%3A%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fusr%2Flib%2Fpython3.10%2Frunpy.py%22%2C%20line%20196%2C%20in%20_run_module_as_main%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20_run_code(code%2C%20main_globals%2C%20None%2C%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fusr%2Flib%2Fpython3.10%2Frunpy.py%22%2C%20line%2086%2C%20in%20_run_code%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20exec(code%2C%20run_globals)%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2F__main__.py%22%2C%20line%203%2C%20in%20%3CMODULE%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20main()%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2Fapp%2Fmain.py%22%2C%20line%201199%2C%20in%20main%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20app.run(argv%20or%20sys.argv%5B1%3A%5D)%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2Fapp%2Fmain.py%22%2C%20line%20278%2C%20in%20run%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20self.run_command(argv%2C%20early_args)%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2Fapp%2Fmain.py%22%2C%20line%20628%2C%20in%20run_command%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20self.handle_extension_command_error(ece)%3CBR%20%2F%3E%26nbsp%3B%20File%20%22%2Fhome%2Fjohnsonchris%2F.local%2Flib%2Fpython3.10%2Fsite-packages%2Fwest%2Fapp%2Fmain.py%22%2C%20line%20454%2C%20in%20handle_extension_command_error%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20self.cmd.err(msg%2C%20fatal%3DTrue)%3CBR%20%2F%3EAttributeError%3A%20'NoneType'%20object%20has%20no%20attribute%20'err'%3C%2FMODULE%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ETo%20my%20knowledge%20all%20of%20the%20dependencies%20are%20satisfied.%26nbsp%3B%20I%20attempted%20to%20install%20the%20SDK%20dependency%20manager%20application%20on%20Linux%20but%20this%20installation%20also%20fails.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2267785%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20KW47%20VSCode%20Integration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2267785%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMissing%20jinja2%20package%20was%20the%20solution.%26nbsp%3B%20pip3%20install%20jinja2%3C%2FP%3E%3C%2FLINGO-BODY%3E