-
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
Unable to flash M5 board -> {ModuleNotFoundError: No module named 'lark'} #23477
Comments
I think IDF (which is from Generally we do NOT build with idf.py build. Please do this (on a clean shell without idf or activate) source scripts/activate.sh # or bootstrap.sh if first run
./scripts/build/build_examples.py --target esp32-m5stack-all-clusters build if you are wondering what it does, there is a sequencing difference: you MUST first export IDF and only then activate. using --dry-run in build_examples shows the steps: # Generating esp32-m5stack-all-clusters
mkdir -p /workspace/out/esp32-m5stack-all-clusters
cp examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults /workspace/out/esp32-m5stack-all-clusters/sdkconfig.defaults
rm -f examples/all-clusters-app/esp32/sdkconfig
bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh;
export SDKCONFIG_DEFAULTS=/workspace/out/esp32-m5stack-all-clusters/sdkconfig.defaults
idf.py -C examples/all-clusters-app/esp32 -B /workspace/out/esp32-m5stack-all-clusters reconfigure'
rm -f examples/all-clusters-app/esp32/sdkconfig
# Building esp32-m5stack-all-clusters
bash -c 'source $IDF_PATH/export.sh; source scripts/activate.sh;
export SDKCONFIG_DEFAULTS=/workspace/out/esp32-m5stack-all-clusters/sdkconfig.defaults
idf.py -C examples/all-clusters-app/esp32 -B /workspace/out/esp32-m5stack-all-clusters build' |
@phonnakasturi-apple Hmm, the ESP docs do say to run install/export first, before running activate, afaict. If changing the order works, please close? |
I would also be very interested if build_examples.py works. Never tested on mac, but it is intended to be |
Executing -> ./scripts/build/build_examples.py --target esp32-m5stack-all-clusters build throws the following error:
Order of execution: cd connectedhomeip |
@phonnakasturi-apple below sequence should work
|
@shubhamdp Following the above sequence, gives the following error:
|
Note: With SHA 0c00923 if I execute in the following sequence ;
I get "No module named 'stringcase'" error complete log:
|
Note: It stopped working from SHA 559c7d5 |
By manually installing the following modules, I could get the M5 board to flash;
|
@phonnakasturi-apple I believe the order of python invocation must be first idf then activate/bootstrap. if you switch the order (i.e. run export.sh last) then a python with different modules will be used and I expect lark/stringcase errors. |
@andy31415 Following is the order of execution:
And this gives the modules missing error;
|
I am saying that I specifically do NOT expect this to work: you are executing please switch your steps by making sure export.sh is run before activate.sh and use activate.sh to setup the final build environment. |
@andy31415 I switched the steps to the following;
And I git the following error;
I tried executing again -> /Users/priyankahonnakasturi/tools/esp-idf/install.sh and . /Users/priyankahonnakasturi/tools/esp-idf/export.sh still got the same error |
@phonnakasturi-apple Can you try the same set of steps on a new terminal instance/window with ESP IDF v4.4.2 (that's the one we support with Matter) and see if it helps. Steps here |
@dhrishi With ESP IDF v4.4.2 and same steps; I get:
|
@phonnakasturi-apple Is it possible for you to clean the |
@dhrishi With SHA 599ad3b -> After clearing the ~/connectedhomeip/.environment and executing the following sequence; it worked and I no longer see missing modules error
|
I think the issue is that our requirements for esp32 in bootstrap is linked to linux: sets everything around |
This seems to have changed in #22071 which claims that mac compile fails due to gdbui bringing in gevent and failing. Maybe the solution would be to not restrict all of them but only restrict gdbgui. |
@phonnakasturi-apple would you be able to test this out: remove all restrictions from requirements.esp32.txt and see if that makes it work in the sequence of "export.sh BEFORE activate.sh" ? We may need to adjust some constraints as well. |
@andy31415 I tried with SHA b87a86b, after removing all the restrictions from requirements.esp32.txt and I still see the same issue. Sequence of commands;
Output:
|
@phonnakasturi-apple I got this as well now and I think my scenario reduces to:
Is this what is happening maybe for you as well?
|
@andy31415
And after deleting the .environment, and executing the above mentioned steps I get the same error
|
Closing per @kean-apple, given this looks like things have been resolved |
Reproduction steps
Bug prevalence
Always
GitHub hash of the SDK that was being used
706e9bb
Platform
darwin
Platform Version(s)
No response
Anything else?
Attaching the log;
M5_error_log.txt
The text was updated successfully, but these errors were encountered: