You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Essential initialization failed" when running example with --features freeze-stdlib #4292
I'm getting the following when running any example as such:
cargo run --example hello_embed --features freeze-stdlib
thread 'main' panicked at 'essential initialization failed; run with RUST_BACKTRACE=1 to see Python backtrace', vm/src/vm/mod.rs:283:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Is this intended? Why? When and how should I use freeze-stdlib?
Nothing has been added as frozen since hello_embed runs without_stdlib. In cases where you'd like to freeze the non-native modules you'd use with_init and call vm.add_frozen(rustpython_pylib::frozen_stdlib()) in it.
Activity
DimitrisJim commentedon Nov 23, 2022
Nothing has been added as frozen since
hello_embedrunswithout_stdlib. In cases where you'd like to freeze the non-native modules you'd usewith_initand callvm.add_frozen(rustpython_pylib::frozen_stdlib())in it.DimitrisJim commentedon Nov 23, 2022
Note that in this case, the
codecsmodule couldn't be loaded, if you run it after settingRUST_BACKTRACEyou'll see the import error.jimmiebtlr commentedon Nov 27, 2022
How did you resolve the codecs error? I'm seeing that error when using some of the examples, however the python code actually seems to run still.