Rayman / ros-get

Simple tools for working with ROS source packages
MIT License
6 stars 6 forks source link

TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object #107

Open Timple opened 3 years ago

Timple commented 3 years ago

I tried to init a workspace using the standard rosdistro:

$ ros-get ws-create https://github.com/ros/rosdistro /opt/ros/melodic/
-----------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/melodic
Workspace:                   /home/tim/ros-ws
-----------------------------------------------------
Knip
Bla bla catkin stuff 
Knip
[build]   Abandoned: None.                                                                             
[build]   Failed:    None.                                                                             
[build] Runtime: 2.3 seconds total.                                                                    
[INFO] root: symlink '/home/tim/ros-ws' => '/home/tim/.config/ros-get/workspaces/ros-ws'
[INFO] ros_get.workspace: saved the workspace as 'ros-ws'
[INFO] ros_get.workspace: created first workspace, let's make it the default
[INFO] root: symlink 'workspaces/ros-ws' => '/home/tim/.config/ros-get/workspace'
Exception ignored in: <bound method BaseEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>
Traceback (most recent call last):
  File "/home/tim/.local/lib/python3.6/site-packages/trollius/base_events.py", line 395, in __del__
  File "/home/tim/.local/lib/python3.6/site-packages/trollius/unix_events.py", line 65, in close
  File "/home/tim/.local/lib/python3.6/site-packages/trollius/unix_events.py", line 166, in remove_signal_handler
  File "/usr/lib/python3.6/signal.py", line 47, in signal
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object

ros-get installed by using:

pip install --user ros-get`

Pip version: pip 20.1 (python 3.6)

reinzor commented 3 years ago

Not sure if related but your ros index url seems to be wrong. It should be:

https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Timple commented 3 years ago

Same error :slightly_smiling_face:

reinzor commented 3 years ago

See a same error here. Might be related to python3 on 18.04. We are running python3 on 20.04 without any issues.

Timple commented 3 years ago

Yes, python2 works. This can be closed.

Curious though why python3 doesn't work on 20.04 in a dockerfile?

FROM ubuntu:20.04
RUN apt-get update -qq && apt-get install -qqy python3-pip 
RUN python3 -m pip install ros-get
RUN ros-get ws-create https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml /opt/ros/noetic/
reinzor commented 3 years ago

That is due to the catkin_tools version that is shipped with ubuntu, see https://github.com/Rayman/ros-get/issues/95

reinzor commented 3 years ago

And another thing, ubuntu:20.04 does not have the /opt/ros/noetic install space.

This seems to work:

FROM ros:noetic-ros-base
RUN apt-get update -qq && apt-get install -qqy python3-pip git 
RUN python3 -m pip install ros-get git+https://github.com/catkin/catkin_tools.git
RUN ros-get ws-create https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml /opt/ros/noetic/
Timple commented 3 years ago

That is due to the catkin_tools version that is shipped with ubuntu, see #95

Should have remembered that I guess. As I posted the workaround there :smile:

I'll put in a PR updating the README.md