Error message
Recently using Ubuntu22.04 to build OpenHarmony compilation environment, When executing the hb set
command to select the development board, the following error appears:
The detailed log is as follows:
fangye@fangye-virtual-machine:~/niobeu4_src$ hb set
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File "/home/fangye/.local/lib/python3.10/site-packages/hb/__main__.py", line 84, in main
[OHOS ERROR] status = args.command(args)
[OHOS ERROR] File "/home/fangye/niobeu4_src/build/lite/hb_internal/set/set.py", line 45, in exec_command
[OHOS ERROR] return set_product() == 0
[OHOS ERROR] File "/home/fangye/niobeu4_src/build/lite/hb_internal/set/set.py", line 62, in set_product
[OHOS ERROR] product_info = Product.product_menuconfig()
[OHOS ERROR] File "/home/fangye/niobeu4_src/build/lite/hb_internal/common/product.py", line 260, in product_menuconfig
[OHOS ERROR] product = menu.list_promt('product', 'Which product do you need" alt="" />
Solution:
Modify the python script reported error: modify from collections import Mapping
tofrom collections.abc import Mapping
:
vim ~/.local/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py