instruction for solving issue with this error : " AttributeError: module 'em' has no attribute 'BUFFERED_OPT' when building firmware for esp32 on udp transfering
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system, embedded-iot
Research direction
Start with the reported ros2 run micro_ros_setup build_firmware.sh failure and the ESP32 Python environment at firmware/toolchain/espressif/python_env/idf4.1_py3.8_env. Verify the em.BUFFERED_OPT error and the listed Empy installation steps, then determine where this workaround should be documented; done means the firmware build instructions clearly cover the error and recovery.
Written by the indexing model from the issue text.
Description
Issue template
- Hardware description: esp32
- RTOS: freeRtos
- Installation type: micro_ros_setup
- Version or commit hash: version of micro-ROS used: galactic for Ubuntu 20.04
Steps to reproduce the issue
Assuming you have already setup the firmware using ros2 run micro_ros_setup create_firmware_ws.sh freertos esp32 and after proper wifi configuration, when you try to build the firmware for udp transferring using ros2 run micro_ros_setup build_firmware.sh you will most likely get an error which related to the Python environment and the em (Empy) module. The specific error is:
AttributeError: module 'em' has no attribute 'BUFFERED_OPT'
To resolve this issue, follow these steps:
- First, deactivate any active Python virtual environments:
deactivate
To install empy in the specific Python environment used by the build process, you should use the pip associated with that Python installation. Here's the command to install empy version 3.3.4 in that environment:
~/microros_ws/firmware/toolchain/espressif/python_env/idf4.1_py3.8_env/bin/pip3 install empy==3.3.4
- After that, verify the installation:
~/microros_ws/firmware/toolchain/espressif/python_env/idf4.1_py3.8_env/bin/python3 -c "import em; print(em.__file__)"
- Update setuptools and wheel:
~/microros_ws/firmware/toolchain/espressif/python_env/idf4.1_py3.8_env/bin/pip3 install --upgrade setuptools wheel
- Clean your micro-ROS workspace:
cd ~/microros_ws
rm -rf build install log
- Rebuild the workspace:
colcon build --symlink-install
- Source the setup file:
source install/local_setup.bash
- Try building the firmware again:
ros2 run micro_ros_setup build_firmware.sh
- Dominant language
- C++
- Stars
- 201
- Forks
- 111
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micro-ROS/micro-ROS-Agent
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
micro-ROS/micro-ROS-Agent#270 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
micro-ROS/micro-ROS-Agent#269 ·
-
Release to apt Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
micro-ROS/micro-ROS-Agent#267 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
micro-ROS/micro-ROS-Agent#266 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
micro-ROS/micro-ROS-Agent#265 · 1 comment ·
All issues in micro-ROS/micro-ROS-Agent
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100