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

catkin_create_package TypeError [closed]

asked 2015-10-08 03:10:02 -0500

Ariel gravatar image

Hello,

I'm trying to create a simple catkin package, but I'm getting a strange error that I could not find an answer on the forum or google. This is what I get:

ariel@ariel-GT70:~/catkin_ws/src$ catkin_create_pkg test roscpp
Traceback (most recent call last):
  File "/usr/local/bin/catkin_create_pkg", line 68, in <module>
    main()
  File "/usr/local/bin/catkin_create_pkg", line 61, in main
    newfiles={})
  File "/usr/local/lib/python3.4/dist-packages/catkin_pkg/package_templates.py", line 209, in create_package_files
    _safe_write_files(newfiles, target_path)
  File "/usr/local/lib/python3.4/dist-packages/catkin_pkg/package_templates.py", line 185, in _safe_write_files
    fhand.write(content)
TypeError: 'str' does not support the buffer interface

Any ideas?. Thanks for the answer.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Ariel
close date 2015-10-12 12:36:13.805575

Comments

Please post the platform you are using.

Dirk Thomas gravatar image Dirk Thomas  ( 2015-10-08 11:40:10 -0500 )edit

I'm working on ubuntu 14.04 (64 bits) with ros indigo.

Ariel gravatar image Ariel  ( 2015-10-09 04:35:02 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-10-08 06:52:43 -0500

joq gravatar image

updated 2015-10-08 06:55:09 -0500

Looks like you have this installed in /usr/local, perhaps via pip. Do you also have a version installed in /usr via apt-get install?

If so, remove the pip version and use the Debian package.

edit flag offensive delete link more

Comments

I've never used pip. To be sure I removed and purge ros* and re-installed (ros-indigo-desktop-full) it and I still have the same issue.

Ariel gravatar image Ariel  ( 2015-10-08 08:00:27 -0500 )edit

You mean it's still running out of /usr/local?

joq gravatar image joq  ( 2015-10-08 09:21:14 -0500 )edit

Yes, in /usr/local. This is what I have:

ls /usr/local/bin/ catkin_create_pkg catkin_make_isolated catkin_topological_order catkin_find catkin_package_version easy_install catkin_init_workspace catkin_prepare_release easy_install-3.4 catkin_make catkin_test_results

Ariel gravatar image Ariel  ( 2015-10-08 09:55:14 -0500 )edit

The Debian packages do not install to /usr/local, so you have some other version there, which you need to delete from both /usr/local/bin and /usr/local/lib/python3.4/dist-packages.

joq gravatar image joq  ( 2015-10-09 10:18:48 -0500 )edit

I believe I should NOT do rm catkin*, right? What would be the best (and safest) way to remove everything from /usr/local/bin and /usr/local/lib/python3.4/dist-packages?

Ariel gravatar image Ariel  ( 2015-10-12 04:32:51 -0500 )edit

I did rm catkin* in /usr/local/bin and the issue was solved. Thanks for the help.

Ariel gravatar image Ariel  ( 2015-10-12 05:32:32 -0500 )edit

If you did not use pip, rm was probably the only solution. Please click on the check mark if it answered your question.

joq gravatar image joq  ( 2015-10-12 10:27:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-10-08 03:10:02 -0500

Seen: 696 times

Last updated: Oct 08 '15