ModuleNotFoundError: No module named 'fcntl' (An error occurred while generating code after the matter feature was customized)

log:

cheng@gavin MINGW64 /d/ncs/v2.4.0
$ cd modules/lib/matter

cheng@gavin MINGW64 /d/ncs/v2.4.0/modules/lib/matter ((v2.4.0))
$ zap ../../../../igloo/test/lock_240/lock/src/lock.zap

馃敡 Using state directory: C:\Users\cheng\.zap
[11848:0705/171016.230:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is disabled, ANGLE is

cheng@gavin MINGW64 /d/ncs/v2.4.0/modules/lib/matter ((v2.4.0))
$ zap ../../../../igloo/test/lock_240/lock/src/lock.zap

馃敡 Using state directory: C:\Users\cheng\.zap
[27192:0705/181154.933:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is disabled, ANGLE is

cheng@gavin MINGW64 /d/ncs/v2.4.0/modules/lib/matter ((v2.4.0))
$ zap ../../../../igloo/test/lock_240/lock/src/lock.zap

馃敡 Using state directory: C:\Users\cheng\.zap

cheng@gavin MINGW64 /d/ncs/v2.4.0/modules/lib/matter ((v2.4.0))
$ python ./scripts/tools/zap/generate.py ../../../../igloo/test/lock_240/lock/src/lock.zap -t src/app/zap-templates/app-templates.json -o ../../../../igloo/test/lock_240/lock/src/zap-generated
Traceback (most recent call last):
File "./scripts/tools/zap/generate.py", line 19, in <module>
import fcntl
ModuleNotFoundError: No module named 'fcntl'

cheng@gavin MINGW64 /d/ncs/v2.4.0/modules/lib/matter ((v2.4.0))
$

Parents
  • fcntl can be retrieved from the network only under linux environment, and can be solved by pip install micropython-fcntl under windos, but the installation failed here.

    so,to continue in the unbuntu environment, but there are still other errors:

    Initializing shell environment!
    bug5@ubuntu:~/ncs/v2.4.0$ zap ../../../../igloo/matter_lock/lock/src/lock.zap
    Traceback (most recent call last):
    File "/usr/lib/command-not-found", line 27, in <module>
    from CommandNotFound.util import crash_guard
    ModuleNotFoundError: No module named 'CommandNotFound'
    bug5@ubuntu:~/ncs/v2.4.0$ python
    Python 3.8.10 (default, May 26 2023, 14:05:08)
    [GCC 9.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    [1]+ 已停止 python
    bug5@ubuntu:~/ncs/v2.4.0$ python2
    ImportError: No module named site
    bug5@ubuntu:~/ncs/v2.4.0$

Reply
  • fcntl can be retrieved from the network only under linux environment, and can be solved by pip install micropython-fcntl under windos, but the installation failed here.

    so,to continue in the unbuntu environment, but there are still other errors:

    Initializing shell environment!
    bug5@ubuntu:~/ncs/v2.4.0$ zap ../../../../igloo/matter_lock/lock/src/lock.zap
    Traceback (most recent call last):
    File "/usr/lib/command-not-found", line 27, in <module>
    from CommandNotFound.util import crash_guard
    ModuleNotFoundError: No module named 'CommandNotFound'
    bug5@ubuntu:~/ncs/v2.4.0$ python
    Python 3.8.10 (default, May 26 2023, 14:05:08)
    [GCC 9.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    [1]+ 已停止 python
    bug5@ubuntu:~/ncs/v2.4.0$ python2
    ImportError: No module named site
    bug5@ubuntu:~/ncs/v2.4.0$

Children
No Data
Related