zephyrproject-rtos/west

west update - AttributeError: 'NoneType' object has no attribute 'err'

zafersn opened this issue · 1 comments

I just wanted to create my own project and run these commands in order. When I ran west update command got the error below:

a.	cd C:\\
b.	python -m venv zephyrproject\.venv
c.	zephyrproject\.venv\Scripts\activate.bat
d.	cd zephyrproject
e.	west init -m https://github.com/zsen/sdk-custom-zephyrproject
f.	west update

(.venv) C:\zephyrproject>west update
Traceback (most recent call last):
  File "C:\Users\zsen_\AppData\Roaming\Python\Python311\site-packages\west\app\main.py", line 363, in load_extension_specs
    path_specs = extension_commands(self.config,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zsen_\AppData\Roaming\Python\Python311\site-packages\west\commands.py", line 603, in extension_commands
    specs[project.path] = _ext_specs(project)
                          ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zsen_\AppData\Roaming\Python\Python311\site-packages\west\commands.py", line 642, in _ext_specs
    ret.extend(_ext_specs_from_desc(project, commands_desc))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zsen_\AppData\Roaming\Python\Python311\site-packages\west\commands.py", line 650, in _ext_specs_from_desc
    raise ExtensionCommandError(
west.commands.ExtensionCommandError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\zsen_\AppData\Roaming\Python\Python311\Scripts\west.exe\__main__.py", line 7, in <module>
  File "C:\Users\zsen_\AppData\Roaming\Python\Python311\site-packages\west\app\main.py", line 1085, in main
    app.run(argv or sys.argv[1:])
  File "C:\Users\zsen_\AppData\Roaming\Python\Python311\site-packages\west\app\main.py", line 237, in run
    self.load_extension_specs()
  File "C:\Users\zsen_\AppData\Roaming\Python\Python311\site-packages\west\app\main.py", line 366, in load_extension_specs
    self.handle_extension_command_error(ece)
  File "C:\Users\zsen_\AppData\Roaming\Python\Python311\site-packages\west\app\main.py", line 412, in handle_extension_command_error
    self.cmd.err(msg, fatal=True)
    ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'err'

Ok I found the issue because of:

I had a defined (but actually script file does not exist) west-commands in C:\zephyrproject\custum-sdk\scripts\west-commands.yml.
So When I removed them from west-cmd.yml file and then ran west update again. that worked for me.