<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: errors when I ran the chef.py example in Step 4 in the Build a Matter virtual device tutorial in Smart Home Developer Forum</title>
    <link>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/errors-when-I-ran-the-chef-py-example-in-Step-4-in-the-Build-a-Matter/m-p/560327#M5297</link>
    <description>&lt;P class="p1"&gt;If you've encountered issues with your ConnectedHomeIp setup, follow these steps to ensure a clean environment and resolve potential package version conflicts. &lt;BR /&gt;Consider resetting your ConnectedHomeIp setup(&lt;STRONG&gt;rm -rf ~/connectedhomeip&lt;/STRONG&gt;) and run below commands:&lt;/P&gt;
&lt;P class="p1"&gt;1. On a Linux laptop, download the ConnectedHomeIp repo:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;git clone&amp;nbsp;&lt;/STRONG&gt;&lt;A href="https://github.com/project-chip/connectedhomeip.git" target="_blank" rel="noopener"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;https://github.com/project-chip/connectedhomeip.git&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class="p1"&gt;2. Open up the downloaded repository:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;cd connectedhomeip&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;3. Check out the most recent commit touching the project:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;git checkout 4f65f6c&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;4. Update all the sub-moduldes&amp;nbsp;within the repository:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;git submodule update --init --recursive&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;5. Run the bootstrap script, setting up the repo and establishing a python virtual environment:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;source ./scripts/bootstrap.sh&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;6. Open up the chef folder containing virtual device examples:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;cd examples/chef/&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;7. Ran the chef.py for the first time, which configures a config.yaml that can be further updated:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;chef.py -u&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;8. Built the virtual device using the dimmable light example:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;./chef.py -zbr -d rootnode_dimmablelight_bCwGYSDpoe -t linux&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 18:58:12 GMT</pubDate>
    <dc:creator>arm_dpe</dc:creator>
    <dc:date>2023-12-12T18:58:12Z</dc:date>
    <item>
      <title>errors when I ran the chef.py example in Step 4 in the Build a Matter virtual device tutorial</title>
      <link>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/errors-when-I-ran-the-chef-py-example-in-Step-4-in-the-Build-a-Matter/m-p/556755#M5277</link>
      <description>&lt;P&gt;&lt;STRONG&gt;here in&amp;nbsp;&lt;A href="https://developers.home.google.com/codelabs/matter-device-virtual#1" target="_blank"&gt;https://developers.home.google.com/codelabs/matter-device-virtual#1&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I tried to run this command inside the docker image, from the gitlab examples/chef repo:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;./chef.py -zbr -d rootnode_dimmablelight_bCwGYSDpoe -t linux&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it ran for awhile but errored out with this trace:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;______ __ __ _______ _______&lt;BR /&gt;/ || | | | | ____|| ____|&lt;BR /&gt;| ,----'| |__| | | |__ | |__&lt;BR /&gt;| | | __ | | __| | __|&lt;BR /&gt;| `----.| | | | | |____ | |&lt;BR /&gt;\______||__| |__| |_______||__|&lt;/P&gt;&lt;P&gt;Target is set to rootnode_dimmablelight_bCwGYSDpoe&lt;BR /&gt;Setting up environment...&lt;BR /&gt;/workspace/MatterIOT/connectedhomeip/examples/chef/../..//scripts/activate.sh: line 122: scripts/setup/gen_pigweed_cipd_json.py: No such file or directory&lt;/P&gt;&lt;P&gt;WELCOME TO...&lt;/P&gt;&lt;P&gt;&amp;lt; CHEF banner stuff..... . &amp;gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ACTIVATOR! This sets your shell environment variables.&lt;/P&gt;&lt;P&gt;Activating environment (setting environment variables):&lt;/P&gt;&lt;P&gt;Setting environment variables for CIPD package manager...done&lt;BR /&gt;warning: pattern /workspace/MatterIOT/connectedhomeip/.environment/pigweed.json matched 0 files&lt;BR /&gt;Setting environment variables for Project actions........skipped&lt;BR /&gt;Setting environment variables for Python environment.....done&lt;BR /&gt;Setting environment variables for pw packages............skipped&lt;BR /&gt;Setting environment variables for Host tools.............done&lt;/P&gt;&lt;P&gt;Checking the environment:&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_cli/plugins.py", line 96, in from_name&lt;BR /&gt;module = importlib.import_module(module_name)&lt;BR /&gt;File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module&lt;BR /&gt;return _bootstrap._gcd_import(name[level:], package, level)&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1030, in _gcd_import&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1007, in _find_and_load&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 972, in _find_and_load_unlocked&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 228, in _call_with_frames_removed&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1030, in _gcd_import&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 1007, in _find_and_load&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 986, in _find_and_load_unlocked&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 680, in _load_unlocked&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap_external&amp;gt;", line 855, in exec_module&lt;BR /&gt;File "&amp;lt;frozen importlib._bootstrap&amp;gt;", line 228, in _call_with_frames_removed&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_unit_test/__init__.py", line 16, in &amp;lt;module&amp;gt;&lt;BR /&gt;from pw_unit_test.rpc import (&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_unit_test/rpc.py", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt;from pw_rpc.client import Services&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_rpc/__init__.py", line 20, in &amp;lt;module&amp;gt;&lt;BR /&gt;from pw_rpc.client import Client&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_rpc/client.py", line 32, in &amp;lt;module&amp;gt;&lt;BR /&gt;from pw_rpc import descriptors, packets&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_rpc/packets.py", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt;from pw_rpc.internal import packet_pb2&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_rpc/internal/packet_pb2.py", line 33, in &amp;lt;module&amp;gt;&lt;BR /&gt;_descriptor.EnumValueDescriptor(&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 796, in __new__&lt;BR /&gt;_message.Message._CheckCalledFromGeneratedFile()&lt;BR /&gt;TypeError: Descriptors cannot not be created directly.&lt;BR /&gt;If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc &amp;gt;= 3.19.0.&lt;BR /&gt;If you cannot immediately regenerate your protos, some other possible workarounds are:&lt;BR /&gt;1. Downgrade the protobuf package to 3.20.x or lower.&lt;BR /&gt;2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).&lt;/P&gt;&lt;P&gt;More information: &lt;A href="https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates" target="_blank"&gt;https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The above exception was the direct cause of the following exception:&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/bin/pw", line 8, in &amp;lt;module&amp;gt;&lt;BR /&gt;sys.exit(main())&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_cli/__main__.py", line 43, in main&lt;BR /&gt;pw_command_plugins.register()&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_cli/pw_command_plugins.py", line 65, in register&lt;BR /&gt;_register_builtin_plugins(plugin_registry)&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_cli/pw_command_plugins.py", line 42, in _register_builtin_plugins&lt;BR /&gt;registry.register_by_name('test', 'pw_unit_test.test_runner', 'main')&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_cli/plugins.py", line 303, in register_by_name&lt;BR /&gt;Plugin.from_name(name, module_name, member_name, source)&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_cli/plugins.py", line 104, in from_name&lt;BR /&gt;raise Error(f'Failed to import module "{module_name}"') from err&lt;BR /&gt;pw_cli.plugins.Error: Failed to import module "pw_unit_test.test_runner" (TypeError: Descriptors cannot not be created directly.&lt;BR /&gt;If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc &amp;gt;= 3.19.0.&lt;BR /&gt;If you cannot immediately regenerate your protos, some other possible workarounds are:&lt;BR /&gt;1. Downgrade the protobuf package to 3.20.x or lower.&lt;BR /&gt;2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).&lt;/P&gt;&lt;P&gt;More information: &lt;A href="https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates" target="_blank"&gt;https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates&lt;/A&gt;)&lt;BR /&gt;Error during activate--see messages above.&lt;BR /&gt;Running ZAP script to generate artifacts&lt;BR /&gt;Searching for zcl file from /workspace/MatterIOT/connectedhomeip/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":wrench:"&gt;🔧&lt;/span&gt; Using temporary state directory: /tmp/zap7g29b5vi/zap.Bpsz9a&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":robot_face:"&gt;🤖&lt;/span&gt; ZAP generation started:&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":magnifying_glass_tilted_left:"&gt;🔍&lt;/span&gt; input files: /workspace/MatterIOT/connectedhomeip/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":magnifying_glass_tilted_left:"&gt;🔍&lt;/span&gt; output pattern: /workspace/MatterIOT/connectedhomeip/examples/chef/out/rootnode_dimmablelight_bCwGYSDpoe/zap-generated/&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":magnifying_glass_tilted_left:"&gt;🔍&lt;/span&gt; using templates: /workspace/MatterIOT/connectedhomeip/src/app/zap-templates/matter-idl-server.json&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":magnifying_glass_tilted_left:"&gt;🔍&lt;/span&gt; using zcl data: /workspace/MatterIOT/connectedhomeip/src/app/zap-templates/zcl/zcl.json&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":magnifying_glass_tilted_left:"&gt;🔍&lt;/span&gt; zap version: ver. 2023.11.28, featureLevel 99, commit: 346129357ae10897c17be991b6220989e3f3d7bf from 2023-11-28T14:03:50.000Z, mode: binary, exe: zap-cli&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":one_o_clock:"&gt;🕐&lt;/span&gt; Setup time: 3s 91ms&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt; using input file: /workspace/MatterIOT/connectedhomeip/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt; using output destination: /workspace/MatterIOT/connectedhomeip/examples/chef/out/rootnode_dimmablelight_bCwGYSDpoe/zap-generated/&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":one_o_clock:"&gt;🕐&lt;/span&gt; File loading time: 92ms&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":robot_face:"&gt;🤖&lt;/span&gt; Generating files:&lt;BR /&gt;✍ /workspace/MatterIOT/connectedhomeip/examples/chef/out/rootnode_dimmablelight_bCwGYSDpoe/zap-generated/Clusters.matter&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":one_o_clock:"&gt;🕐&lt;/span&gt; Generation time: 296ms&lt;BR /&gt;Files generated in: /workspace/MatterIOT/connectedhomeip/examples/chef/out/rootnode_dimmablelight_bCwGYSDpoe/zap-generated/&lt;BR /&gt;RPC PW enabled&lt;BR /&gt;RPC PW on linux not supported&lt;BR /&gt;Software Version String: ""&lt;BR /&gt;Product ID 0x8000 / Vendor ID 0xFFF1&lt;BR /&gt;Building...&lt;BR /&gt;x86_64&lt;BR /&gt;ERROR at //third_party/connectedhomeip/third_party/pigweed/repo/third_party/nanopb/BUILD.gn:68:21: Empty directory path.&lt;BR /&gt;rebase_path(pw_protobuf_compiler_PROTOC_BINARY, "//", root_build_dir)&lt;BR /&gt;^---------------------------------&lt;BR /&gt;You can't use empty strings as directories.&lt;BR /&gt;See //third_party/connectedhomeip/third_party/pigweed/repo/pw_protobuf_compiler/proto.gni:286:21: which caused the file to be included.&lt;BR /&gt;"$dir_pw_third_party/nanopb",&lt;BR /&gt;^---------------------------&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/examples/chef/./chef.py", line 1010, in &amp;lt;module&amp;gt;&lt;BR /&gt;sys.exit(main())&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/examples/chef/./chef.py", line 870, in main&lt;BR /&gt;shell.run_cmd("gn gen out")&lt;BR /&gt;File "/workspace/MatterIOT/connectedhomeip/examples/chef/stateful_shell.py", line 139, in run_cmd&lt;BR /&gt;raise RuntimeError(&lt;BR /&gt;RuntimeError: Error. Nonzero return code.&lt;BR /&gt;Returncode: 1&lt;BR /&gt;Cmd: gn gen out&lt;BR /&gt;matter@ken-HP-ProDesk-600-G1-SFF:/workspace/MatterIOT/connectedhomeip/examples/chef$&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 23:33:45 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/errors-when-I-ran-the-chef-py-example-in-Step-4-in-the-Build-a-Matter/m-p/556755#M5277</guid>
      <dc:creator>kencottrell</dc:creator>
      <dc:date>2023-12-06T23:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: errors when I ran the chef.py example in Step 4 in the Build a Matter virtual device tutorial</title>
      <link>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/errors-when-I-ran-the-chef-py-example-in-Step-4-in-the-Build-a-Matter/m-p/560327#M5297</link>
      <description>&lt;P class="p1"&gt;If you've encountered issues with your ConnectedHomeIp setup, follow these steps to ensure a clean environment and resolve potential package version conflicts. &lt;BR /&gt;Consider resetting your ConnectedHomeIp setup(&lt;STRONG&gt;rm -rf ~/connectedhomeip&lt;/STRONG&gt;) and run below commands:&lt;/P&gt;
&lt;P class="p1"&gt;1. On a Linux laptop, download the ConnectedHomeIp repo:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;git clone&amp;nbsp;&lt;/STRONG&gt;&lt;A href="https://github.com/project-chip/connectedhomeip.git" target="_blank" rel="noopener"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;https://github.com/project-chip/connectedhomeip.git&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class="p1"&gt;2. Open up the downloaded repository:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;cd connectedhomeip&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;3. Check out the most recent commit touching the project:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;git checkout 4f65f6c&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;4. Update all the sub-moduldes&amp;nbsp;within the repository:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;git submodule update --init --recursive&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;5. Run the bootstrap script, setting up the repo and establishing a python virtual environment:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;source ./scripts/bootstrap.sh&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;6. Open up the chef folder containing virtual device examples:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;cd examples/chef/&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;7. Ran the chef.py for the first time, which configures a config.yaml that can be further updated:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;chef.py -u&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;8. Built the virtual device using the dimmable light example:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;./chef.py -zbr -d rootnode_dimmablelight_bCwGYSDpoe -t linux&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 18:58:12 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/errors-when-I-ran-the-chef-py-example-in-Step-4-in-the-Build-a-Matter/m-p/560327#M5297</guid>
      <dc:creator>arm_dpe</dc:creator>
      <dc:date>2023-12-12T18:58:12Z</dc:date>
    </item>
  </channel>
</rss>

