-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFound Error: No module named 'lark' #24816
Comments
@Sausebraus What's the last time you bootstrapped? It's possible that So I would recommend running bootstrap and seeing if that fixes the problem. |
@bzbarsky-apple thanks for the quick response. The bootstrap actually fixed the problem in the terminal, yet I still get the same result in the demo project. Do I have to update something else in order for the demo project to receive the new files? |
I'm not sure what you mean by "demo project"... Bootstrap should fix the problem in the terminal where it runs and any setting where "activate" is run after that bootstrap. Depending on exactly what "demo project" is and how things actually run there, it may not be picking up the activate environment at all... |
the demo project is just the lighting app which is in the examples folder of matter. @bzbarsky-apple do you happen to know how things work there? |
OK, and what exact commands are you running to build it? It sounds like you are not building it from the terminal? How are you doing it? |
oh sorry @bzbarsky-apple , I am working in vs code with esp-idf installed. The microcontroller I am using is the ESP32-S3. I am building the project with esp-idf within vs code (command+shift+p and select build with esp idf). Now I have reinstalled esp-idf with a guide from the Espressif homepage (select the correct board and under Installation > manual installation > Linux and macOS) and put into my .zprofile two commands: and
You can check if the IDF_PATH is correctly set by running I don't know wether this has solved the issue or not because I am now facing new errors. While building it prints out the following error: [0/1] Re-running CMake... -- Configuring incomplete, errors occurred! Did I mess up Ninja or CMake? I am so sorry if my description is unclear or dumb but I am very tired, I try to get this up and running for a few days now |
@shubhamdp or @dhrishi may know more about this. |
Same error: downloaded esp-idf 5.0 new and reinstalled matter as well, botstrapping and activating, then moving to the examples folder, doing
I did Had to do |
I've found that some recent PRs have caused conflicts between macOS and Linux python setups. On my Mac, I removed all the platform and linux arch values from the scripts/requirements.esp32.txt. I was then able to run export.sh and activate.sh before compiling and flashing the all-clusters-app example. The pull request #22071 wi will give you some insight. Seems there is some back and forth between macOS and linux environments. |
When building the example code lighting app for esp32s3 I get the above mentioned error. Even after running the following command: "source scripts/activate.sh && gn gen out/debug && ninja -C out/debug"
the output is:
[48/2051] ACTION //examples/all-cluste...en(//build/toolchain/host:mac_x64_gcc)
FAILED: gen/examples/all-clusters-app/all-clusters-common/app/PluginApplicationCallbacks.h gen/examples/all-clusters-app/all-clusters-common/app/callback-stub.cpp
python3 ../../third_party/pigweed/repo/pw_build/py/pw_build/python_runner.py --gn-root ../../ --current-path ../../examples/all-clusters-app/all-clusters-common --default-toolchain=//build/toolchain/host:mac_x64_gcc --current-toolchain=//build/toolchain/host:mac_x64_gcc --capture-output --python-dep-list-files gen/examples/all-clusters-app/all-clusters-common/all-clusters-common_codegen_codegen_metadata_path_list.txt -- ../../scripts/codegen.py --generator cpp-app --output-dir gen/examples/all-clusters-app/all-clusters-common --expected-outputs gen/examples/all-clusters-app/all-clusters-common/all-clusters-common_codegen.expected.outputs ../../examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
Traceback (most recent call last):
File "/Users/fjprogramming/connectedhomeip/out/debug/../../scripts/codegen.py", line 28, in
from matter_idl.matter_idl_parser import CreateParser
File "/Users/fjprogramming/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/matter_idl/matter_idl_parser.py", line 7, in
from lark import Lark
ModuleNotFoundError: No module named 'lark'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/fjprogramming/connectedhomeip/out/debug/../../scripts/codegen.py", line 32, in
from matter_idl.matter_idl_parser import CreateParser
File "/Users/fjprogramming/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/matter_idl/matter_idl_parser.py", line 7, in
from lark import Lark
ModuleNotFoundError: No module named 'lark'
[57/2051] ACTION //examples/all-cluste...en(//build/toolchain/host:mac_x64_gcc)
ninja: build stopped: subcommand failed.
Does anybody have a solution for this error? I am working on an Intel MacBook.
The text was updated successfully, but these errors were encountered: