ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

colcon build --symlink-install: TypeError: 'NoneType' object is not iterable

asked 2020-03-09 03:48:43 -0500

AHJL001 gravatar image

updated 2020-03-09 03:59:20 -0500

gvdhoorn gravatar image

Hi, I am trying to install ROS 2 on my ubuntu 18.04 laptop.

However, after entering colcon build --symlink-install. I am met with this error,

Starting >>> test_launch_ros
--- stderr: test_launch_ros                     
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_core/task/__init__.py", line 92, in __call__
    return await task_method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_ros/task/ament_python/build.py", line 55, in build
    setup_py_data.get('data_files', []))
  File "/usr/lib/python3/dist-packages/colcon_core/task/python/__init__.py", line 34, in get_data_files_mapping
    for data_file in data_files:
TypeError: 'NoneType' object is not iterable
---
Failed   <<< test_launch_ros    [ Exited with code 1 ]
Aborted  <<< examples_rclcpp_minimal_action_server         
Aborted  <<< test_communication                           
Aborted  <<< message_filters                             
Aborted  <<< examples_rclcpp_minimal_composition         
Aborted  <<< examples_rclcpp_minimal_action_client       
Aborted  <<< rosbag2                                     
Aborted  <<< quality_of_service_demo_cpp                  
Aborted  <<< intra_process_demo                           
Aborted  <<< demo_nodes_cpp                               
Aborted  <<< test_quality_of_service                      
Aborted  <<< turtlesim

And

Summary: 220 packages finished [2min 23s]
  1 package failed: test_launch_ros
  11 packages aborted: demo_nodes_cpp examples_rclcpp_minimal_action_client examples_rclcpp_minimal_action_server examples_rclcpp_minimal_composition intra_process_demo message_filters quality_of_service_demo_cpp rosbag2 test_communication test_quality_of_service turtlesim
  1 package had stderr output: test_launch_ros
  39 packages not processed
'NoneType' object is not iterable

Please advise, thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-03-09 04:21:31 -0500

marguedas gravatar image

Based on this error, I'm guessing you're trying to build ROS 2 Dashing from source (despite the question being tagged melodic). Note that if you build the last distro: ROS Eloquent, you won't face the issue.

Can you confirm the version of colcon-ros you are using (you can run colcon version-check) ? How did you install colcon ?

It seems that some versions of colcon-ros had a bug in that regard that has been recently fixed. To get the fix you need to be using colcon-ros 0.3.17, that is currently only available from pip, the deb version hasn't hit the main repository yet.

edit flag offensive delete link more

Comments

This was it! Merci beaucoup!

AHJL001 gravatar image AHJL001  ( 2020-03-09 21:27:51 -0500 )edit

$ colcon version-check colcon-ros 0.3.16: newer version available (0.3.17)

How can i upgrade colcon-ros fot 0.3.16 --> 0.3.17

komkrit gravatar image komkrit  ( 2020-03-09 23:08:11 -0500 )edit

currently you either need to install it via pip:

pip3 install colcon-common-extensions

or to install the package from the testing repository:

sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2-testing/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-testing.list'
sudo apt update
sudo apt upgrade python3-colcon-ros
marguedas gravatar image marguedas  ( 2020-03-10 04:38:36 -0500 )edit

You shouldn't install Python packages via pip if there are Debian packages for it. The Debian package should be in the main repo by now - so there shouldn't be a need to switch to the testing repo.

Dirk Thomas gravatar image Dirk Thomas  ( 2020-03-10 13:10:04 -0500 )edit

Thank you so much merduedas... _/|_

komkrit gravatar image komkrit  ( 2020-03-11 06:25:15 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-03-09 03:48:43 -0500

Seen: 1,727 times

Last updated: Mar 09 '20